Tests: adjusted check_version()'s.

This commit is contained in:
Andrey Zelenkov
2018-02-05 15:39:11 +03:00
parent f7195e7016
commit 3faa154223
7 changed files with 16 additions and 7 deletions

View File

@@ -4,7 +4,10 @@ import unit
class TestUnitConfiguration(unit.TestUnitControl): class TestUnitConfiguration(unit.TestUnitControl):
def setUpClass(): def setUpClass():
unit.TestUnit().check_modules('python') u = unit.TestUnit()
u.check_modules('python')
u.check_version('0.5')
def test_json_leading_zero(self): def test_json_leading_zero(self):
self.assertIn('error', self.conf('00'), 'leading zero') self.assertIn('error', self.conf('00'), 'leading zero')

View File

@@ -4,7 +4,10 @@ import unit
class TestUnitBasic(unit.TestUnitControl): class TestUnitBasic(unit.TestUnitControl):
def setUpClass(): def setUpClass():
unit.TestUnit().check_modules('php') u = unit.TestUnit()
u.check_modules('php')
u.check_version('0.5')
conf_app = { conf_app = {
"app": { "app": {

View File

@@ -7,7 +7,7 @@ class TestUnitApplication(unit.TestUnitControl):
u = unit.TestUnit() u = unit.TestUnit()
u.check_modules('python') u.check_modules('python')
u.check_version('0.4') u.check_version('0.5')
def conf_with_name(self, name): def conf_with_name(self, name):
self.conf({ self.conf({

View File

@@ -9,7 +9,7 @@ class TestUnitApplication(unit.TestUnitControl):
u = unit.TestUnit() u = unit.TestUnit()
u.check_modules('python') u.check_modules('python')
u.check_version('0.3') u.check_version('0.5')
def test_python_application(self): def test_python_application(self):
code, name = """ code, name = """

View File

@@ -4,7 +4,10 @@ import unit
class TestUnitBasic(unit.TestUnitControl): class TestUnitBasic(unit.TestUnitControl):
def setUpClass(): def setUpClass():
unit.TestUnit().check_modules('python') u = unit.TestUnit()
u.check_modules('python')
u.check_version('0.5')
conf_app = { conf_app = {
"app": { "app": {

View File

@@ -7,7 +7,7 @@ class TestUnitApplication(unit.TestUnitControl):
u = unit.TestUnit() u = unit.TestUnit()
u.check_modules('python') u.check_modules('python')
u.check_version('0.4') u.check_version('0.5')
@unittest.expectedFailure @unittest.expectedFailure
def test_python_keepalive_body(self): def test_python_keepalive_body(self):

View File

@@ -9,7 +9,7 @@ class TestUnitApplication(unit.TestUnitControl):
u = unit.TestUnit() u = unit.TestUnit()
u.check_modules('python') u.check_modules('python')
u.check_version('0.3') u.check_version('0.5')
def getWorkerCount(self): def getWorkerCount(self):
n = 0 n = 0