Example #1
0
 def test_v1_is_paginated_true(self):
     aha = AhaV1('enverus', AHA_KEY)
     mock = {"pagination": "yes"}
     self.assertTrue(aha._is_paginated(mock))
Example #2
0
 def test_v1_is_paginated_false(self):
     aha = AhaV1('enverus', AHA_KEY)
     mock = {"no_pagination": "no"}
     self.assertFalse(aha._is_paginated(mock))
Example #3
0
 def test_v1_endpoint_parse_3(self):
     aha = AhaV1('enverus', AHA_KEY)
     endpoint = aha._parse_endpoint_arg('initiatives')
     self.assertEqual('initiatives', endpoint)
Example #4
0
 def test_v1_page(self):
     aha = AhaV1('enverus', AHA_KEY)
     aha.query('initiatives', per_page=200)
     expected_pages = math.ceil(aha.count / 200)
     self.assertEqual(expected_pages, aha.total_pages)
Example #5
0
 def test_v1_fields(self):
     aha = AhaV1('enverus', AHA_KEY)
     data = aha.query('initiatives', fields='name,id')
     for i in data:
         self.assertIsNotNone(i['name'])
Example #6
0
 def test_v1_count(self):
     aha = AhaV1('enverus', AHA_KEY)
     count = aha._count('epics')
     self.assertGreater(count, -1)
Example #7
0
 def test_v1_query(self):
     aha = AhaV1('enverus', AHA_KEY)
     data = aha.query('initiatives')
     self.assertIsNotNone(data)