Skip to content
This repository has been archived by the owner on Jan 2, 2024. It is now read-only.

Commit

Permalink
test GPX export
Browse files Browse the repository at this point in the history
  • Loading branch information
bwaldvogel committed Feb 3, 2015
1 parent 14642e2 commit 4824b0f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/test_openmoves.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ def _validateResponse(self, response, tmpdir=None, code=200, checkContent=True):

if checkContent:
self._validateHtml5(response)

if response.data:
return response.data.decode('utf-8')

def _validateHtml5(self, response):
Expand Down Expand Up @@ -239,3 +241,11 @@ def test_moves(self, tmpdir):
assert u'<td><span>2.8 km/h</span></td>' in response_data
assert u'<td><span>27.4°C</span></td>' in response_data
assert u'<td>795</td>' in response_data

def test_gpx_export(self, tmpdir):
self._login()
response = self.client.get('/moves/3/export?format=gpx')
response_data = self._validateResponse(response, checkContent=False)
assert u'<gpx ' in response_data
assert u'lat="50.632' in response_data
assert u'lon="6.952' in response_data

0 comments on commit 4824b0f

Please sign in to comment.