kopia lustrzana https://github.com/wagtail/wagtail
Ensure image forms allow file uploads
rodzic
6f2099fb16
commit
852e2b87e8
|
@ -75,6 +75,9 @@ class TestImageAddView(TestCase, WagtailTestUtils):
|
|||
# is displayed on the form
|
||||
self.assertNotContains(response, '<label for="id_collection">')
|
||||
|
||||
# Ensure the form supports file uploads
|
||||
self.assertContains(response, 'enctype="multipart/form-data"')
|
||||
|
||||
def test_get_with_collections(self):
|
||||
root_collection = Collection.get_first_root_node()
|
||||
root_collection.add_child(name="Evil plans")
|
||||
|
@ -264,6 +267,9 @@ class TestImageEditView(TestCase, WagtailTestUtils):
|
|||
self.assertEqual(response.status_code, 200)
|
||||
self.assertTemplateUsed(response, 'wagtailimages/images/edit.html')
|
||||
|
||||
# Ensure the form supports file uploads
|
||||
self.assertContains(response, 'enctype="multipart/form-data"')
|
||||
|
||||
@override_settings(WAGTAIL_USAGE_COUNT_ENABLED=True)
|
||||
def test_with_usage_count(self):
|
||||
response = self.get()
|
||||
|
|
Ładowanie…
Reference in New Issue