Skip to content

Commit

Permalink
Fix tests on Travis
Browse files Browse the repository at this point in the history
(cherry picked from commit d7b4b80)
  • Loading branch information
afabiani committed Oct 21, 2020
1 parent 4f6256e commit 927c1dc
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions geonode/layers/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -1136,14 +1136,13 @@ def test_moderated_upload(self):
if isinstance(content, bytes):
content = content.decode('UTF-8')
data = json.loads(content)
if 'url' in data:
if 'success' in data and data['success'] == True:
lname = data['url'].split(':')[-1]
_l = Layer.objects.get(name=lname)
self.assertTrue(_l.is_approved)
self.assertTrue(_l.is_published)
else:
logger.info(data)
raise Exception(data)
logger.warning(data)

with self.settings(ADMIN_MODERATE_UPLOADS=True):
layer_upload_url = reverse('layer_upload')
Expand Down

0 comments on commit 927c1dc

Please sign in to comment.