def test_task_serializer_deve_ser_um_dict(self): task_name = 'Ligar para o Will' state = 'TODO' task = Task(task_name, state) self.assertIsInstance(task_serializer(task), dict)
def test_task_serializer_must_be_a_dict(self): """Test seiralizer is dict.""" task_name = 'Ligar para o Will' state = 'TODO' task = Task(task_name, state) self.assertIsInstance(task_serializer(task), dict)
def test_check_model_representation(self): esperado = 'Task(task_name="Acordar", state="TODO")' chamada = Task('Acordar', 'TODO') self.assertEqual(esperado, str(chamada))
def test_check_model_has_id_and_his_is_int(self): chamada = Task('', '') self.assertIsInstance(chamada.id_, int)
def Task(self): """Task.""" return Task(self.task_name(), self.state(), self.id_())
def Task(self): return Task(self.task_name(), self.state(), self.id_())