Skip to content

Commit 3e8e7f0

Browse files
committed
Test servers on argument specification test.py <url>
1 parent f859507 commit 3e8e7f0

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

test.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22
import unittest
33
from loklak import Loklak
44
import os
5-
5+
import sys
66

77
class TestLoklak(unittest.TestCase):
88
""""test class"""
9+
baseUrl = 'http://loklak.org/'
10+
911
def setUp(self):
1012
"""test proper setup"""
11-
self.loklak = Loklak()
13+
self.loklak = Loklak(self.baseUrl)
1214

1315
def test_status(self):
1416
"""test status"""
@@ -105,4 +107,6 @@ def test_aggregations(self):
105107
self.assertTrue('mentions' in data['aggregations'])
106108

107109
if __name__ == '__main__':
110+
if len(sys.argv) > 1:
111+
TestLoklak.baseUrl = sys.argv.pop()
108112
unittest.main()

0 commit comments

Comments
 (0)