Ensure image forms allow file uploads

pull/2518/head
Tim Heap 2016-03-30 18:08:11 +11:00 zatwierdzone przez Matt Westcott
rodzic 6f2099fb16
commit 852e2b87e8
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -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()