kopia lustrzana https://github.com/wagtail/wagtail
Ensure example.doc is deleted after running TestServeView
rodzic
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)))
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue