Ejemplo n.º 1
0
 def test_cell_geoip_mismatch(self):
     # UK GeoIP with US mcc
     cell = CellShardFactory.create(mcc=310)
     query = self.model_query(cells=[cell])
     res = self._call(body=query, ip=self.test_ip)
     self.check_model_response(res, cell, region='US')
     self.check_db_calls(rw=0, ro=0)
Ejemplo n.º 2
0
 def test_cell_geoip_mismatch(self):
     # UK GeoIP with US mcc
     cell = CellShardFactory.create(mcc=310)
     query = self.model_query(cells=[cell])
     res = self._call(body=query, ip=self.test_ip)
     self.check_model_response(res, cell, region='US')
     self.check_db_calls(rw=0, ro=0)
Ejemplo n.º 3
0
 def test_cell_ambiguous(self):
     # cell with ambiguous mcc to region mapping
     cell = CellShardFactory.create(mcc=234)
     query = self.model_query(cells=[cell])
     res = self._call(body=query)
     self.check_model_response(res, cell, region='GB')
     self.check_db_calls(rw=0, ro=0)
Ejemplo n.º 4
0
 def test_cell_ambiguous(self):
     # cell with ambiguous mcc to region mapping
     cell = CellShardFactory.create(mcc=234)
     query = self.model_query(cells=[cell])
     res = self._call(body=query)
     self.check_model_response(res, cell, region='GB')
     self.check_db_calls(rw=0, ro=0)