-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db119df
commit efa602f
Showing
5 changed files
with
13 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,6 @@ script: | |
- coverage run manage.py test | ||
|
||
python: | ||
- "2.6" | ||
- "2.7" | ||
- "3.4" | ||
- "3.5" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,20 @@ | ||
from django_gpxpy.gpx_parse import parse_gpx | ||
from django.test import TestCase | ||
from django.core.exceptions import ValidationError | ||
|
||
class DjangoGpxPyTests(TestCase): | ||
def test_admin_filter_RelatedFieldRadioFilter(self): | ||
def test_gpx_parsing(self): | ||
""" | ||
test if the admin page with RelatedFieldRadioFilter filters loads succesfully | ||
""" | ||
with open("tests/test_data/test_track.gpx", "r") as f: | ||
multilinestring = parse_gpx(f) | ||
self.assertEquals(multilinestring.num_geom, 26) | ||
|
||
def test_bad_file_parsing(self): | ||
""" | ||
test if the admin page with RelatedFieldRadioFilter filters loads succesfully | ||
""" | ||
with self.assertRaises(ValidationError): | ||
with open("tests/test_data/test_bad_file.gpx", "r") as f: | ||
multilinestring = parse_gpx(f) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
</gpx> |