Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Commit

Permalink
Point: test invalid load
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Jun 17, 2016
1 parent 107d9a3 commit 718ef62
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -297,5 +297,7 @@ class Meta:
load = DocSchema().load(data)
assert not load.errors
assert load.data.point == { 'type': 'Point', 'coordinates': [10, 20] }


# Try to load invalid coordinates
data = {'point': { 'x': '10', 'y': '20foo' }}
load = DocSchema().load(data)
assert 'point' in load.errors

0 comments on commit 718ef62

Please sign in to comment.