Exemple #1
0
    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)
Exemple #2
0
    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)
Exemple #3
0
    def test_check_model_representation(self):
        esperado = 'Task(task_name="Acordar", state="TODO")'
        chamada = Task('Acordar', 'TODO')

        self.assertEqual(esperado, str(chamada))
Exemple #4
0
 def test_check_model_has_id_and_his_is_int(self):
     chamada = Task('', '')
     self.assertIsInstance(chamada.id_, int)
Exemple #5
0
 def Task(self):
     """Task."""
     return Task(self.task_name(), self.state(), self.id_())
Exemple #6
0
 def Task(self):
     return Task(self.task_name(), self.state(), self.id_())