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

Commit

Permalink
Add tests for Point
Browse files Browse the repository at this point in the history
  • Loading branch information
lafrech committed Jun 16, 2016
1 parent 2068b43 commit 107d9a3
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_fields.py
Expand Up @@ -289,4 +289,13 @@ class Meta:
dump = DocSchema().dump(doc)
assert not dump.errors
assert dump.data['point'] == { 'x': 10, 'y': 20 }
load = DocSchema().load(dump.data)
assert not load.errors
assert load.data.point == { 'type': 'Point', 'coordinates': [10, 20] }
# Deserialize Point with coordinates passed as string
data = {'point': { 'x': '10', 'y': '20' }}
load = DocSchema().load(data)
assert not load.errors
assert load.data.point == { 'type': 'Point', 'coordinates': [10, 20] }


0 comments on commit 107d9a3

Please sign in to comment.