Skip to content

Commit

Permalink
- Fix Tests
Browse files Browse the repository at this point in the history
  • Loading branch information
afabiani committed May 28, 2019
1 parent 203e3f0 commit 72ee5f7
Showing 1 changed file with 8 additions and 11 deletions.
19 changes: 8 additions & 11 deletions geonode/documents/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,17 +264,6 @@ def test_document_isuploaded(self):
follow=True)
self.assertEquals(response.status_code, 200)

_d = Document.objects.get(title='uploaded_document')
_d.delete()

from geonode.documents.utils import delete_orphaned_document_files
delete_orphaned_document_files()

from geonode.base.utils import delete_orphaned_thumbs
delete_orphaned_thumbs()

self.assertFalse(os.path.isfile(f))

# Permissions Tests

def test_set_document_permissions(self):
Expand Down Expand Up @@ -494,6 +483,14 @@ def test_moderated_upload(self):
self.assertTrue(_d.is_published)
_d.delete()

from geonode.documents.utils import delete_orphaned_document_files
delete_orphaned_document_files()

from geonode.base.utils import delete_orphaned_thumbs
delete_orphaned_thumbs()

self.assertFalse(os.path.isfile(input_path))

with self.settings(ADMIN_MODERATE_UPLOADS=True):
document_upload_url = reverse('document_upload')
self.client.login(username=self.user, password=self.passwd)
Expand Down

0 comments on commit 72ee5f7

Please sign in to comment.