예제 #1
0
 def test_clean_failed(self):
     condition = AbstractDate()
     with pytest.raises(ValidationError):
         condition.clean("20160101")
예제 #2
0
 def test_clean_failed(self):
     condition = AbstractDate()
     with pytest.raises(ValidationError):
         condition.clean("20160101")
예제 #3
0
 def test_clean_success(self):
     condition = AbstractDate()
     assert condition.clean('2016-01-01') == '2016-01-01'
예제 #4
0
 def test_clean_success(self):
     condition = AbstractDate()
     assert condition.clean('2016-01-01') == '2016-01-01'