def test_no_longer_searchable_removes_flag(self):
     self.assertEqual(get_searchable_fields(IBaz), [])
     searchable(IBaz, u'baz')
     self.assertEqual(get_searchable_fields(IBaz), ['baz'])
     self.assertTrue(no_longer_searchable(IBaz, 'baz'))
     self.assertFalse(no_longer_searchable(IBaz, 'baz'))
     self.assertEqual(get_searchable_fields(IBaz), [])
 def test_no_longer_searchable_removes_flag(self):
     self.assertEqual(get_searchable_fields(IBaz), [])
     searchable(IBaz, u'baz')
     self.assertEqual(get_searchable_fields(IBaz), ['baz'])
     self.assertTrue(no_longer_searchable(IBaz, 'baz'))
     self.assertFalse(no_longer_searchable(IBaz, 'baz'))
     self.assertEqual(get_searchable_fields(IBaz), [])
Beispiel #3
0
 def test_title_is_searchable(self):
     self.assertIn('title', get_searchable_fields(IBasic))
Beispiel #4
0
 def test_description_is_searchable(self):
     self.assertIn('description', get_searchable_fields(IBasic))
 def test_marking_field_as_searchable(self):
     self.assertEqual(get_searchable_fields(IExample), [])
     searchable(IExample, u'foo')
     self.assertEqual(get_searchable_fields(IExample), ['foo'])
 def test_title_is_searchable(self):
     self.assertIn('title', get_searchable_fields(IBasic))
 def test_description_is_searchable(self):
     self.assertIn('description', get_searchable_fields(IBasic))
 def test_marking_field_as_searchable(self):
     self.assertEqual(get_searchable_fields(IExample), [])
     searchable(IExample, u'foo')
     self.assertEqual(get_searchable_fields(IExample), ['foo'])