本文整理汇总了Python中ichnaea.tests.factories.CellFactory.create方法的典型用法代码示例。如果您正苦于以下问题:Python CellFactory.create方法的具体用法?Python CellFactory.create怎么用?Python CellFactory.create使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ichnaea.tests.factories.CellFactory
的用法示例。
在下文中一共展示了CellFactory.create方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_cell_geoip_mismatch
# 需要导入模块: from ichnaea.tests.factories import CellFactory [as 别名]
# 或者: from ichnaea.tests.factories.CellFactory import create [as 别名]
def test_cell_geoip_mismatch(self):
# UK GeoIP with US mcc
cell = CellFactory.create(mcc=310)
query = self.model_query(cells=[cell])
res = self._call(body=query, ip=self.test_ip)
self.check_model_response(res, cell, country='US')
self.check_db_calls(rw=0, ro=0)
示例2: test_cell_ambiguous
# 需要导入模块: from ichnaea.tests.factories import CellFactory [as 别名]
# 或者: from ichnaea.tests.factories.CellFactory import create [as 别名]
def test_cell_ambiguous(self):
# cell with ambiguous mcc to country mapping
cell = CellFactory.create(mcc=234)
query = self.model_query(cells=[cell])
res = self._call(body=query)
self.check_model_response(res, cell, country='GB')
self.check_db_calls(rw=0, ro=0)
示例3: test_cell
# 需要导入模块: from ichnaea.tests.factories import CellFactory [as 别名]
# 或者: from ichnaea.tests.factories.CellFactory import create [as 别名]
def test_cell(self):
# cell with unique mcc to region mapping
cell = CellFactory.create(mcc=235)
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)
示例4: test_cell
# 需要导入模块: from ichnaea.tests.factories import CellFactory [as 别名]
# 或者: from ichnaea.tests.factories.CellFactory import create [as 别名]
def test_cell(self):
# create a cell in the UK
cell = CellFactory.create(mcc=235)
query = self.model_query(cells=[cell])
res = self._call(body=query)
self.check_model_response(res, cell, country='GB')
self.check_db_calls(rw=0, ro=0)
self.check_stats(
counter=[self.metric + '.cell_hit'])