Skip to content

Commit

Permalink
[test] Removed duplication of definition of floorplan test file
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed May 9, 2018
1 parent ea1ca66 commit 660dd29
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions django_loci/tests/base/test_admin_inline.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
import os

from django.conf import settings
from django.contrib.gis.geos import GEOSGeometry
from django.db.models.fields.files import ImageFieldFile
from django.urls import reverse
Expand Down Expand Up @@ -182,7 +179,7 @@ def test_add_indoor_new_location_new_floorplan(self):
self._login_as_admin()
p = self._get_prefix()
params = self.params
floorplan_file = open(os.path.join(settings.BASE_DIR, 'media/floorplan.jpg'), 'rb')
floorplan_file = open(self._floorplan_path, 'rb')
params.update({
'name': 'test-add-indoor-new-location-new-floorplan',
'{0}-0-type'.format(p): 'indoor',
Expand Down Expand Up @@ -216,7 +213,7 @@ def test_add_indoor_existing_location_new_floorplan(self):
pre_loc = self._create_location(type='indoor')
p = self._get_prefix()
params = self.params
floorplan_file = open(os.path.join(settings.BASE_DIR, 'media/floorplan.jpg'), 'rb')
floorplan_file = open(self._floorplan_path, 'rb')
name = 'test-add-indoor-existing-location-new-floorplan'
params.update({
'name': name,
Expand Down Expand Up @@ -305,7 +302,7 @@ def test_change_indoor(self):
self.assertContains(r, obj.name)
# -- post changes
params = self.params
floorplan_file = open(os.path.join(settings.BASE_DIR, 'media/floorplan.jpg'), 'rb')
floorplan_file = open(self._floorplan_path, 'rb')
changed_name = '{0} changed'.format(pre_loc.name)
params.update({
'name': obj.name,
Expand Down

0 comments on commit 660dd29

Please sign in to comment.