kopia lustrzana https://github.com/wagtail/wagtail
assertEquals -> assertEqual
rodzic
1499715e43
commit
5fd1cfd3c0
|
@ -183,40 +183,40 @@ class TestSeparateFiltersFromQuery(SimpleTestCase):
|
|||
filters, query = separate_filters_from_query('hello world')
|
||||
|
||||
self.assertDictEqual(filters, {})
|
||||
self.assertEquals(query, 'hello world')
|
||||
self.assertEqual(query, 'hello world')
|
||||
|
||||
def test_filter(self):
|
||||
filters, query = separate_filters_from_query('author:foo')
|
||||
|
||||
self.assertDictEqual(filters, {'author': 'foo'})
|
||||
self.assertEquals(query, '')
|
||||
self.assertEqual(query, '')
|
||||
|
||||
def test_filter_with_quotation_mark(self):
|
||||
filters, query = separate_filters_from_query('author:"foo bar"')
|
||||
|
||||
self.assertDictEqual(filters, {'author': 'foo bar'})
|
||||
self.assertEquals(query, '')
|
||||
self.assertEqual(query, '')
|
||||
|
||||
def test_filter_and_query(self):
|
||||
filters, query = separate_filters_from_query('author:foo hello world')
|
||||
|
||||
self.assertDictEqual(filters, {'author': 'foo'})
|
||||
self.assertEquals(query, 'hello world')
|
||||
self.assertEqual(query, 'hello world')
|
||||
|
||||
def test_filter_with_quotation_mark_and_query(self):
|
||||
filters, query = separate_filters_from_query('author:"foo bar" hello world')
|
||||
|
||||
self.assertDictEqual(filters, {'author': 'foo bar'})
|
||||
self.assertEquals(query, 'hello world')
|
||||
self.assertEqual(query, 'hello world')
|
||||
|
||||
def test_filter_with_unclosed_quotation_mark_and_query(self):
|
||||
filters, query = separate_filters_from_query('author:"foo bar hello world')
|
||||
|
||||
self.assertDictEqual(filters, {})
|
||||
self.assertEquals(query, 'author:"foo bar hello world')
|
||||
self.assertEqual(query, 'author:"foo bar hello world')
|
||||
|
||||
def test_two_filters_and_query(self):
|
||||
filters, query = separate_filters_from_query('author:"foo bar" hello world bar:beer')
|
||||
|
||||
self.assertDictEqual(filters, {'author': 'foo bar', 'bar': 'beer'})
|
||||
self.assertEquals(query, 'hello world')
|
||||
self.assertEqual(query, 'hello world')
|
||||
|
|
Ładowanie…
Reference in New Issue