Coverage for bookie.tests.test_api.test_admin : 99%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
"""Test that we're meeting delicious API specifications"""
"""Test the bookie admin api calls."""
def api_key(self): """Cache the api key for all calls.""" "SELECT api_key FROM users WHERE username='admin'").fetchone()
"""We need to empty the bmarks table on each run"""
"""DB Needs some imports to be able to query.""" # add out completed one username='admin', file_path='testing.txt' )
"""Test that we can fetch the inactive users.""" # for now just make sure we can get a 200 call on it. 'api_key': self.api_key } params=params, status=200) # by default we shouldn't have any inactive users eq_(0, u['invite_ct'], "Count should be 0 to start.")
"""Test we can call and get the invite counts.""" # for now just make sure we can get a 200 call on it. 'api_key': self.api_key } params=params, status=200) # we should get back tuples of username/count
"The admin user shouldn't have any invites." + res.body)
"""Test we can set the invite count for the user""" # for now just make sure we can get a 200 call on it. 'api_key': self.api_key } params=params, status=200) # we should get back tuples of username/count "The admin user data is returned to us." + res.body) "The admin user now has 10 invites." + res.body)
# and of course when we're done we need to unset it back to 0 or else # the test above blows up...sigh. params=params, status=200)
"""Test that we can get a count of the imports in the system.""" 'api_key': self.api_key } params=params, status=200)
# we should get back tuples of username/count
"The first import is from admin " + res.body) "And it has a status of 0 " + res.body)
"""Test that we can hit the api and get the list of users.""" 'api_key': self.api_key } params=params, status=200)
# we should get back dict of count, users.
"The first user is from admin " + res.body) "The first user is from testing@dummy.com " + res.body)
"""Verify we can remove a user and their bookmarks via api."""
'/api/v1/a/users/delete/{0}?api_key={1}'.format( 'bob', self.api_key), status=200)
# we should get back dict of count, users.
# Verify that we have no bookmark for the user any longer. |