Ensure example.doc is deleted after running TestServeView

pull/3791/head^2
Matt Westcott 2017-06-20 13:30:48 +01:00
rodzic b00377c418
commit deeee4a597
1 zmienionych plików z 6 dodań i 0 usunięć

Wyświetl plik

@ -20,6 +20,9 @@ class TestServeView(TestCase):
self.document = models.Document(title="Test document")
self.document.file.save('example.doc', ContentFile("A boring example document"))
def tearDown(self):
self.document.delete()
def get(self):
return self.client.get(reverse('wagtaildocs_serve', args=(self.document.id, self.document.filename)))
@ -78,6 +81,9 @@ class TestServeViewWithSendfile(TestCase):
self.document = models.Document(title="Test document")
self.document.file.save('example.doc', ContentFile("A boring example document"))
def tearDown(self):
self.document.delete()
def get(self):
return self.client.get(reverse('wagtaildocs_serve', args=(self.document.id, self.document.filename)))