def test_delete(self): workflow = Workflow(**self.test_workflow_data) workflow.save() retr_workflow = Workflow.objects.get(name="test workflow") retr_workflow.delete() retr_workflow2 = Workflow.objects.filter(name="test workflow") self.assertFalse(retr_workflow2.exists())
def test_should_not_be_valid(self): workflow = Workflow(**self.test_workflow_data) workflow.save() retr_workflow = Workflow.objects.get(name="test workflow") self.assertFalse(retr_workflow.valid)
def test_save(self): workflow = Workflow(**self.test_workflow_data) workflow.save() retr_workflow = Workflow.objects.get(name="test workflow") self.assertEqual(retr_workflow.name, workflow.name)