Beispiel #1
0
 def test_filter(self, where):
     Department.filter(max_results=25, start_position='1', Active=True)
     where.assert_called_once_with("Active = True",
                                   max_results=25,
                                   start_position='1',
                                   order_by='',
                                   qb=None)
Beispiel #2
0
 def _get_location(self, sales_name):
     try:
         location = Department.filter(Name=sales_name, qb=self.client)[0]
         return location
     except:
         return None
Beispiel #3
0
 def test_filter_with_qb(self):
     with patch.object(self.qb_client, 'query') as query:
         Department.filter(Active=True, qb=self.qb_client)
         self.assertTrue(query.called)
 def test_filter(self, where):
     Department.filter(max_results=25, start_position='1', Active=True)
     where.assert_called_once_with("Active = True", max_results=25, start_position='1')
 def test_filter_with_qb(self):
     with patch.object(self.qb_client, 'query') as query:
         Department.filter(Active=True, qb=self.qb_client)
         self.assertTrue(query.called)
 def test_filter(self, where):
     Department.filter(Active=True)
     where.assert_called_once_with("Active = True")