Commit 94dd8cd7 authored by inactivist's avatar inactivist
Browse files

Fixing broken unit test from prior commit. Need to deal with null (None)...

Fixing broken unit test from prior commit.  Need to deal with null (None) 'place' attribute in Status objects.
parent 93ca76e5
......@@ -63,7 +63,10 @@ class Status(Model):
elif k == 'retweeted_status':
setattr(status, k, Status.parse(api, v))
elif k == 'place':
setattr(status, k, Place.parse(api, v))
if v is not None:
setattr(status, k, Place.parse(api, v))
else:
setattr(status, k, None)
else:
setattr(status, k, v)
return status
......@@ -328,8 +331,9 @@ class BoundingBox(Model):
@classmethod
def parse(cls, api, json):
result = cls(api)
for k, v in json.items():
setattr(result, k, v)
if json is not None:
for k, v in json.items():
setattr(result, k, v)
return result
def origin(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment