Exemplo n.º 1
0
 def test_rejects_invalid_ordering(self):
     form = ExperimentOrderingForm({"ordering": "invalid ordering"})
     self.assertFalse(form.is_valid())
Exemplo n.º 2
0
 def test_accepts_valid_ordering(self):
     ordering = ExperimentOrderingForm.ORDERING_CHOICES[1][0]
     form = ExperimentOrderingForm({"ordering": ordering})
     self.assertTrue(form.is_valid())