Example #1
0
 def test_convert(self):
     executions_list = list(self.loaded_fixtures['executions'].values())
     converter = JsonConverter()
     converted_doc = converter.convert(executions_list)
     self.assertTrue(type(converted_doc), 'string')
     reversed_doc = json.loads(converted_doc)
     self.assertListEqual(executions_list, reversed_doc)
Example #2
0
 def test_convert(self):
     executions_list = list(self.loaded_fixtures['executions'].values())
     converter = JsonConverter()
     converted_doc = converter.convert(executions_list)
     self.assertTrue(type(converted_doc), 'string')
     reversed_doc = json.loads(converted_doc)
     self.assertListEqual(executions_list, reversed_doc)
Example #3
0
 def test_convert_non_list(self):
     executions_dict = self.loaded_fixtures['executions']
     converter = JsonConverter()
     try:
         converter.convert(executions_dict)
         self.fail('Should have thrown exception.')
     except ValueError:
         pass
Example #4
0
 def test_convert_non_list(self):
     executions_dict = self.loaded_fixtures['executions']
     converter = JsonConverter()
     try:
         converter.convert(executions_dict)
         self.fail('Should have thrown exception.')
     except ValueError:
         pass