mirror of
https://github.com/Hopiu/wagtail.git
synced 2026-04-03 23:00:38 +00:00
Ensure example.doc is deleted on TestServeView teardown
This commit is contained in:
parent
62b8caedd5
commit
f8bbd9b9b5
1 changed files with 3 additions and 1 deletions
|
|
@ -77,7 +77,9 @@ class TestServeView(TestCase):
|
|||
self.document.file.save('example.doc', ContentFile("A boring example document"))
|
||||
|
||||
def tearDown(self):
|
||||
self.document.delete()
|
||||
# delete the FieldFile directly because the TestCase does not commit
|
||||
# transactions to trigger transaction.on_commit() in the signal handler
|
||||
self.document.file.delete()
|
||||
|
||||
def get(self):
|
||||
return self.client.get(reverse('wagtaildocs_serve', args=(self.document.id, self.document.filename)))
|
||||
|
|
|
|||
Loading…
Reference in a new issue