Example #1
0
 def test_construction_no_page(self):
     dummy_qs = QuerySpecification("*")
     q = Query(dummy_qs, mock_query_op)
     self.assertEqual(q._query_spec_or_id, dummy_qs)
     self.assertEqual(q._query_fn, mock_query_op)
     self.assertEqual(q.page_size, None)
     self.assertTrue(q.has_next)
     self.assertIsNone(q.continuation_token)
Example #2
0
 def test_construction_no_page(self):
     dummy_qs = QuerySpecification("*")
     dummy_factory = SasTokenFactory("dummy", "values", "only")
     q = Query(dummy_qs, mock_query_op, dummy_factory)
     self.assertEqual(q._query_spec_or_id, dummy_qs)
     self.assertEqual(q._query_fn, mock_query_op)
     self.assertEqual(q.page_size, None)
     self.assertEqual(q._sastoken_factory, dummy_factory)
     self.assertTrue(q.has_next)
     self.assertIsNone(q.continuation_token)
Example #3
0
 def setUp(self):
     qs = QuerySpecification("*")
     self.querymock = mock.MagicMock()
     sasfactory = SasTokenFactory("dummy", "values", "only")
     self.query = Query(qs, self.querymock, sasfactory, page_size=10)
Example #4
0
 def setUp(self):
     qs = QuerySpecification("*")
     self.querymock = mock.MagicMock(side_effect=mock_query_op)
     sasfactory = SasTokenFactory("dummy", "values", "only")
     self.query = Query(qs, self.querymock, sasfactory)
Example #5
0
 def setUp(self):
     qs = QuerySpecification("*")
     self.querymock = mock.MagicMock()
     self.query = Query(qs, self.querymock, page_size=10)
Example #6
0
 def setUp(self):
     qs = QuerySpecification("*")
     self.querymock = mock.MagicMock(side_effect=mock_query_op)
     self.query = Query(qs, self.querymock, page_size=10)
     global RESULTS
     RESULTS = setup_results()  #reset results to not have wrappers