mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Ensure example.doc is deleted after running TestServeView
This commit is contained in:
parent
b00377c418
commit
deeee4a597
@ -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)))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user