Fix syntax errors in test cases
This commit is contained in:
parent
68686fd3ca
commit
54e052f24d
1 changed files with 4 additions and 4 deletions
8
test.py
8
test.py
|
@ -58,7 +58,7 @@ class TestValidation(tornado.testing.AsyncHTTPTestCase):
|
||||||
self.assertFalse(validation_result['valid'], "Validation result is expected to be valid==false")
|
self.assertFalse(validation_result['valid'], "Validation result is expected to be valid==false")
|
||||||
|
|
||||||
def test_valid_entity(self):
|
def test_valid_entity(self):
|
||||||
with open('test_cases/valid/valid.json', 'r') af f:
|
with open('test_cases/valid/valid.json', 'r') as f:
|
||||||
entity_file = json.load(f)
|
entity_file = json.load(f)
|
||||||
|
|
||||||
response = self.fetch('/v0/validate',
|
response = self.fetch('/v0/validate',
|
||||||
|
@ -73,7 +73,7 @@ class TestValidation(tornado.testing.AsyncHTTPTestCase):
|
||||||
self.assertTrue(validation_result['valid'], "Validation result is expected to be valid==true")
|
self.assertTrue(validation_result['valid'], "Validation result is expected to be valid==true")
|
||||||
|
|
||||||
def test_invalid_iban(self):
|
def test_invalid_iban(self):
|
||||||
with open('test_cases/invalid/invalid_iban.json', 'r') af f:
|
with open('test_cases/invalid/invalid_iban.json', 'r') as f:
|
||||||
entity_file = json.load(f)
|
entity_file = json.load(f)
|
||||||
|
|
||||||
response = self.fetch('/v0/validate',
|
response = self.fetch('/v0/validate',
|
||||||
|
@ -88,7 +88,7 @@ class TestValidation(tornado.testing.AsyncHTTPTestCase):
|
||||||
self.assertFalse(validation_result['valid'], "Validation result is expected to be valid==false")
|
self.assertFalse(validation_result['valid'], "Validation result is expected to be valid==false")
|
||||||
|
|
||||||
def test_missing_id(self):
|
def test_missing_id(self):
|
||||||
with open('test_cases/invalid/missing_id.json', 'r') af f:
|
with open('test_cases/invalid/missing_id.json', 'r') as f:
|
||||||
entity_file = json.load(f)
|
entity_file = json.load(f)
|
||||||
|
|
||||||
response = self.fetch('/v0/validate',
|
response = self.fetch('/v0/validate',
|
||||||
|
@ -104,7 +104,7 @@ class TestValidation(tornado.testing.AsyncHTTPTestCase):
|
||||||
self.assertIn('id', validation_result['errors'])
|
self.assertIn('id', validation_result['errors'])
|
||||||
|
|
||||||
def test_invalid_id(self):
|
def test_invalid_id(self):
|
||||||
with open('test_cases/invalid/invalid_id.json', 'r') af f:
|
with open('test_cases/invalid/invalid_id.json', 'r') as f:
|
||||||
entity_file = json.load(f)
|
entity_file = json.load(f)
|
||||||
|
|
||||||
response = self.fetch('/v0/validate',
|
response = self.fetch('/v0/validate',
|
||||||
|
|
Loading…
Reference in a new issue