Skip to content

Commit

Permalink
Fixed #6, added relevant test code
Browse files Browse the repository at this point in the history
  • Loading branch information
David Robinson committed Jan 31, 2013
1 parent 60755bf commit 5905c7b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 0 additions & 4 deletions parse_rest/__init__.py
Expand Up @@ -477,10 +477,6 @@ class UserQuery(Query):
ENDPOINT_ROOT = '/'.join([API_ROOT, 'users'])
QUERY_CLASS = User

def __init__(self):
"""UserQuery doesn't need a class name to be passed"""
pass


class InstallationQuery(Query):
ENDPOINT_ROOT = '/'.join([API_ROOT, 'installations'])
Expand Down
4 changes: 4 additions & 0 deletions parse_rest/tests.py
Expand Up @@ -250,6 +250,10 @@ def test_user(self):
self.assertEqual(u.username, u_retrieved.username)
self.assertEqual(u_retrieved.phone, "555-5555")

# test UserQuery.fetch
queried_users = uq.fetch()
self.assertTrue(u.username in [qu.username for qu in queried_users])

# test accessing like a dictionary
self.assertEqual(u_retrieved["username"], "dhelmet@spaceballs.com")
self.assertEqual(u_retrieved["phone"], "555-5555")
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -22,7 +22,7 @@ def run(self):

setup(
name='parse_rest',
version='0.6.2013',
version='0.7.2013',
description='A client library for Parse.com\'.s REST API',
url='https://github.com/dgrtwo/ParsePy',
packages=['parse_rest'],
Expand Down

0 comments on commit 5905c7b

Please sign in to comment.