assertEquals -> assertEqual
This commit is contained in:
parent
000de03733
commit
b9d4f6c436
|
@ -72,7 +72,7 @@ class TestFileService(BaseTest):
|
|||
file_data = FileService.get_workflow_data_files(workflow_id=workflow.id)
|
||||
self.assertEqual(1, len(file_data))
|
||||
self.assertEqual(2, file_data[0].version)
|
||||
self.assertEquals(4, file_data[0].size) # File dat size is included.
|
||||
self.assertEqual(4, file_data[0].size) # File dat size is included.
|
||||
|
||||
def test_add_file_from_form_increments_version_and_replaces_on_subsequent_add_with_same_name(self):
|
||||
self.load_example_data()
|
||||
|
|
|
@ -191,7 +191,7 @@ class TestFilesApi(BaseTest):
|
|||
rv = self.app.post('/v1.0/file?workflow_spec_id=%s' % spec.id, data=data, follow_redirects=True,
|
||||
content_type='multipart/form-data', headers=self.logged_in_headers())
|
||||
file_json = json.loads(rv.get_data(as_text=True))
|
||||
self.assertEquals(80, file_json['size'])
|
||||
self.assertEqual(80, file_json['size'])
|
||||
|
||||
data['file'] = io.BytesIO(self.minimal_bpmn("efghijk")), 'my_new_file.bpmn'
|
||||
rv = self.app.put('/v1.0/file/%i/data' % file_json['id'], data=data, follow_redirects=True,
|
||||
|
|
|
@ -65,7 +65,7 @@ class TestSudySponsorsScript(BaseTest):
|
|||
data['out3'][0])
|
||||
self.assertDictEqual({'uid': 'lb3dp', 'role': 'SuperGal', 'send_email': False, 'access': True},
|
||||
data['out4'])
|
||||
self.assertEquals(3, len(data['sponsors']))
|
||||
self.assertEqual(3, len(data['sponsors']))
|
||||
|
||||
|
||||
@patch('crc.services.protocol_builder.requests.get')
|
||||
|
|
|
@ -50,6 +50,6 @@ class TestSudySponsorsScript(BaseTest):
|
|||
data = processor.next_task().data
|
||||
self.assertIn('sponsors', data)
|
||||
self.assertIn('out', data)
|
||||
self.assertEquals('empty', data['empty'])
|
||||
self.assertEquals('newval', data['out'])
|
||||
self.assertEquals(3, len(data['sponsors']))
|
||||
self.assertEqual('empty', data['empty'])
|
||||
self.assertEqual('newval', data['out'])
|
||||
self.assertEqual(3, len(data['sponsors']))
|
||||
|
|
|
@ -112,8 +112,8 @@ class TestStudyDetailsDocumentsScript(BaseTest):
|
|||
FileDataSet().do_task(task, study.id, workflow_model.id, key="ginger", value="doodle", file_id=file.id)
|
||||
docs = StudyInfo().do_task(task, study.id, workflow_model.id, "documents")
|
||||
self.assertTrue(isinstance(docs, Box))
|
||||
self.assertEquals(1, len(docs.UVACompl_PRCAppr.files))
|
||||
self.assertEquals("doodle", docs.UVACompl_PRCAppr.files[0].data_store.ginger)
|
||||
self.assertEqual(1, len(docs.UVACompl_PRCAppr.files))
|
||||
self.assertEqual("doodle", docs.UVACompl_PRCAppr.files[0].data_store.ginger)
|
||||
|
||||
@patch('crc.services.protocol_builder.requests.get')
|
||||
def test_file_data_set_changes_irb_code(self, mock_get):
|
||||
|
@ -133,8 +133,8 @@ class TestStudyDetailsDocumentsScript(BaseTest):
|
|||
FileDataSet().do_task(task, study.id, workflow_model.id, key="irb_code", value="Study_App_Doc", file_id=file.id)
|
||||
docs = StudyInfo().do_task(task, study.id, workflow_model.id, "documents")
|
||||
self.assertTrue(isinstance(docs, Box))
|
||||
self.assertEquals(1, len(docs.Study_App_Doc.files))
|
||||
self.assertEquals("Study_App_Doc", docs.Study_App_Doc.files[0].data_store.irb_code)
|
||||
self.assertEqual(1, len(docs.Study_App_Doc.files))
|
||||
self.assertEqual("Study_App_Doc", docs.Study_App_Doc.files[0].data_store.irb_code)
|
||||
|
||||
|
||||
@patch('crc.services.protocol_builder.requests.get')
|
||||
|
|
|
@ -45,4 +45,4 @@ class TestSudySponsorsScript(BaseTest):
|
|||
self.assertTrue(processor.bpmn_workflow.is_completed())
|
||||
data = processor.next_task().data
|
||||
self.assertIn('sponsors', data)
|
||||
self.assertEquals(3, len(data['sponsors']))
|
||||
self.assertEqual(3, len(data['sponsors']))
|
||||
|
|
|
@ -28,11 +28,11 @@ class TestDocumentDirectories(BaseTest):
|
|||
self.assert_success(rv)
|
||||
json_data = json.loads(rv.get_data(as_text=True))
|
||||
print(json_data)
|
||||
self.assertEquals(2, len(json_data))
|
||||
self.assertEquals('UVA Compliance', json_data[0]['level'])
|
||||
self.assertEquals('PRC Approval', json_data[0]['children'][0]['level'])
|
||||
self.assertEquals('something.png', json_data[0]['children'][0]['children'][0]['file']['name'])
|
||||
self.assertEquals('Study', json_data[1]['level'])
|
||||
self.assertEquals('Application', json_data[1]['children'][0]['level'])
|
||||
self.assertEquals('Document', json_data[1]['children'][0]['children'][0]['level'])
|
||||
self.assertEquals('anything.png', json_data[1]['children'][0]['children'][0]['children'][0]['file']['name'])
|
||||
self.assertEqual(2, len(json_data))
|
||||
self.assertEqual('UVA Compliance', json_data[0]['level'])
|
||||
self.assertEqual('PRC Approval', json_data[0]['children'][0]['level'])
|
||||
self.assertEqual('something.png', json_data[0]['children'][0]['children'][0]['file']['name'])
|
||||
self.assertEqual('Study', json_data[1]['level'])
|
||||
self.assertEqual('Application', json_data[1]['children'][0]['level'])
|
||||
self.assertEqual('Document', json_data[1]['children'][0]['children'][0]['level'])
|
||||
self.assertEqual('anything.png', json_data[1]['children'][0]['children'][0]['children'][0]['file']['name'])
|
||||
|
|
|
@ -106,6 +106,6 @@ class TestMultiinstanceTasksApi(BaseTest):
|
|||
self.assertEqual(WorkflowStatus.complete, workflow.status)
|
||||
data = workflow.next_task.data
|
||||
for key in data["StudyInfo"]["investigators"]:
|
||||
self.assertEquals("dhf8r@virginia.edu", data["StudyInfo"]["investigators"][key]['email'])
|
||||
self.assertEqual("dhf8r@virginia.edu", data["StudyInfo"]["investigators"][key]['email'])
|
||||
|
||||
|
||||
|
|
|
@ -24,5 +24,5 @@ class TestEmptyEnumList(BaseTest):
|
|||
service = WorkflowService()
|
||||
checkbox_enum_field = task.task_spec.form.fields[0]
|
||||
radio_enum_field = task.task_spec.form.fields[1]
|
||||
self.assertEquals([], service.get_default_value(checkbox_enum_field, task))
|
||||
self.assertEquals({'label': None, 'value': None}, service.get_default_value(radio_enum_field, task))
|
||||
self.assertEqual([], service.get_default_value(checkbox_enum_field, task))
|
||||
self.assertEqual({'label': None, 'value': None}, service.get_default_value(radio_enum_field, task))
|
||||
|
|
|
@ -145,5 +145,5 @@ class TestWorkflowSpecValidation(BaseTest):
|
|||
final_data = WorkflowService.test_spec(spec_model.id, required_only=True)
|
||||
self.assertIsNotNone(final_data)
|
||||
self.assertIn('enum_with_default', final_data)
|
||||
self.assertEquals('maybe', final_data['enum_with_default']['value'])
|
||||
self.assertEqual('maybe', final_data['enum_with_default']['value'])
|
||||
|
||||
|
|
Loading…
Reference in New Issue