def test_action_user_and_project_user_should_be_equal(self): bob = User.objects.create_user('bob', '*****@*****.**', 'bob') project = factories.ProjectFactory(user=bob) item = ActionlistItem(text='test', user=u, project=project) with self.assertRaises(ValidationError): item.full_clean()
def test_has_project_field(self): project = factories.ProjectFactory(user=u) item = ActionlistItem(text='test', user=u, project=project) item.save()
def test_has_complete_field(self): item = ActionlistItem(text='test', user=u, complete=False) item.save()
def test_duplicate_actionlist_items_are_invalid(self): factories.ActionlistItemFactory(text='double', user=u) with self.assertRaises(ValidationError): item = ActionlistItem(text='double', user=u) item.full_clean()
def test_has_deadline_field(self): item = ActionlistItem(text='test', user=u, deadline=None) item.save()