def test_valid_consumer_form(self): """ test if that form is a valid consumer one """ d = self.create_github() data = {'repo': d.repo, 'project': d.project} form = GithubConsumerForm(data=data) self.assertTrue(form.is_valid())
def test_invalid_consumer_form(self): """ test if that form is not a valid consumer one """ form = GithubConsumerForm(data={}) self.assertFalse(form.is_valid())