Ejemplo n.º 1
0
 def test_cannot_validate_a_search_with_a_incoherent_publication_years_period(self):
     # Setup
     form_data = {
         'basic_search_term': 'test',
         'pub_year_start': 2014,
         'pub_year_end': 2012,
     }
     # Run & check
     form = SearchForm(data=form_data)
     self.assertFalse(form.is_valid())
Ejemplo n.º 2
0
 def test_cannot_validate_a_search_with_a_incoherent_publication_years_period(self):
     # Setup
     form_data = {
         'basic_search_term': 'test',
         'pub_year_start': 2014,
         'pub_year_end': 2012,
     }
     # Run & check
     form = SearchForm(data=form_data)
     self.assertFalse(form.is_valid())
Ejemplo n.º 3
0
 def test_cannot_validate_a_search_without_a_main_query(self):
     # Setup
     form_data = {}
     # Run & check
     form = SearchForm(data=form_data)
     self.assertFalse(form.is_valid())
Ejemplo n.º 4
0
 def test_cannot_validate_a_search_without_a_main_query(self):
     # Setup
     form_data = {}
     # Run & check
     form = SearchForm(data=form_data)
     self.assertFalse(form.is_valid())