def test_get_task_id_missing_value(self): with self.assertRaises(KeyError): ce.get_task_id({'task_id': {}})
def test_get_task_id_empty_dictionary(self): with self.assertRaises(KeyError): ce.get_task_id({})
def test_get_task_id(self): task_id = tu.get_random_task_id() task = {'task_id': {'value': task_id}} self.assertEqual(task_id, ce.get_task_id(task))