def test_app_choices(self): """Test app choices.""" form = forms.TransactionFilterForm(self.data, apps=self.apps) for app in self.apps: assertion = (app.id, app.name) in form.fields['app'].choices assert assertion, '(%s, %s) not in choices' % (app.id, app.name)
def test_basic(self): """Test the form doesn't crap out.""" form = forms.TransactionFilterForm(self.data, apps=self.apps) assert form.is_valid(), form.errors