Example #1
0
class PicplzAPITest(unittest.TestCase):
    def setUp(self):
        self.api = PicplzAPI()
        self.api.print_json = True

    def test_get_pic(self):
        id = 1534270
        pic = self.api.get_pic(id=id)
        self.assertEqual(pic.id, id)

    def test_get_city(self):
        city_id = 3
        city = self.api.get_city(id=city_id)
        self.assertEqual(city.id, city_id)

    def test_get_filters(self):
        filters = self.api.get_filters()
        self.assertNotEqual(None, filters)

    def test_get_place(self):
        place_id = 1
        place = self.api.get_place(id=place_id)
        self.assertEqual(place.id, place_id)

    def test_user(self):
        username = '******'
        user = self.api.get_user(username)
        self.assertEqual(user.username, username)
Example #2
0
class PicplzAPITest(unittest.TestCase):
    def setUp(self):
        self.api = PicplzAPI()
        self.api.print_json=True
    
    def test_get_pic(self):
        id = 1534270
        pic = self.api.get_pic(id=id)
        self.assertEqual(pic.id, id)
        
    def test_get_city(self):
        city_id = 3
        city = self.api.get_city(id=city_id)
        self.assertEqual(city.id, city_id)
        
    def test_get_filters(self):
        filters = self.api.get_filters()
        self.assertNotEqual(None,filters)
        
    def test_get_place(self):
        place_id=1
        place = self.api.get_place(id=place_id)
        self.assertEqual(place.id, place_id)

    def test_user(self):
        username = '******'
        user = self.api.get_user(username)
        self.assertEqual(user.username, username)
Example #3
0
 def setUp(self):
     self.api = PicplzAPI()
     self.api.print_json = True
Example #4
0
 def send_to_picplz(self, picplz_token, session):
         #try:
                 api = PicplzAPI()
                 response=api.upload_pic_url(picplz_token, session.url)
                 logging.info('picplz api response %s' %response)
Example #5
0
 def setUp(self):
     self.api = PicplzAPI()
     self.api.print_json=True
Example #6
0
 def setUp(self):
     self.api = PicplzAPI()
Example #7
0
 def setUp(self):
     self.api = PicplzAPI()