Skip to content

Commit

Permalink
Update test_fields.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tunavargi committed Jul 21, 2014
1 parent 12175fc commit 1c21200
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions tests/test_fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class PointSerializer(serializers.Serializer):

def restore_object(self, attrs, instance=None):
if instance:
instance.file = attrs['point']
instance.point = attrs['point']
instance.created = attrs['created']
return instance
return SavePoint(**attrs)
Expand All @@ -81,7 +81,7 @@ class PointSerializerTest(TestCase):

def test_create(self):
"""
Test for creating Base64 image in the server side
Test for creating Point field in the server side
"""
now = datetime.datetime.now()
point = {
Expand All @@ -96,7 +96,7 @@ def test_create(self):

def test_validation_error_with_non_file(self):
"""
Passing non-base64 should raise a validation error.
Passing non-dict contains latitude and longitude should raise a validation error.
"""
now = datetime.datetime.now()
serializer = PointSerializer(data={'created': now, 'point': '123'})
Expand All @@ -105,7 +105,7 @@ def test_validation_error_with_non_file(self):

def test_remove_with_empty_string(self):
"""
Passing empty string as data should cause image to be removed
Passing empty string as data should cause point to be removed
"""
now = datetime.datetime.now()
point = {
Expand Down

0 comments on commit 1c21200

Please sign in to comment.