mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-13 03:20:59 +00:00
Use a real field name and a valid snippet model in SnippetChooserPanel tests
This commit is contained in:
parent
028632eabe
commit
cd51efea6a
1 changed files with 5 additions and 5 deletions
|
|
@ -241,14 +241,14 @@ class TestSnippetChooserPanel(TestCase):
|
|||
|
||||
def test_target_content_type(self):
|
||||
result = SnippetChooserPanel(
|
||||
'barbecue',
|
||||
'wagtailcore.site'
|
||||
'advert',
|
||||
'tests.advert'
|
||||
).bind_to_model(SnippetChooserModel).target_content_type()
|
||||
self.assertEqual(result.name, 'Site')
|
||||
self.assertEqual(result.name, 'advert')
|
||||
|
||||
def test_target_content_type_malformed_type(self):
|
||||
result = SnippetChooserPanel(
|
||||
'barbecue',
|
||||
'advert',
|
||||
'snowman'
|
||||
).bind_to_model(SnippetChooserModel)
|
||||
self.assertRaises(ImproperlyConfigured,
|
||||
|
|
@ -256,7 +256,7 @@ class TestSnippetChooserPanel(TestCase):
|
|||
|
||||
def test_target_content_type_nonexistent_type(self):
|
||||
result = SnippetChooserPanel(
|
||||
'barbecue',
|
||||
'advert',
|
||||
'snowman.lorry'
|
||||
).bind_to_model(SnippetChooserModel)
|
||||
self.assertRaises(ImproperlyConfigured,
|
||||
|
|
|
|||
Loading…
Reference in a new issue