def setup_method(self, test_method, dataset_name="events"): super().setup_method(test_method, dataset_name) from snuba.web.views import application assert application.testing is True application.config["PROPAGATE_EXCEPTIONS"] = False self.app = application.test_client()
def setup_method(self, test_method): super(TestState, self).setup_method(test_method) from snuba.web.views import application assert application.testing == True self.app = application.test_client() self.app.post = partial(self.app.post, headers={"referer": "test"})
def setup_method(self, test_method): super(TestReplacer, self).setup_method(test_method) from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.app.post = partial(self.app.post, headers={"referer": "test"}) self.replacer = replacer.ReplacerWorker( self.clickhouse, self.dataset, DummyMetricsBackend(strict=True)) self.project_id = 1
def setup_method(self): from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.app.post = partial(self.app.post, headers={"referer": "test"}) self.storage = get_storage(StorageKey.EVENTS) self.replacer = replacer.ReplacerWorker( self.storage, DummyMetricsBackend(strict=True)) self.project_id = 1 self.event = get_raw_event()
def setup_method(self, test_method): super(TestReplacer, self).setup_method(test_method, "events_migration") from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.app.post = partial(self.app.post, headers={"referer": "test"}) self.replacer = replacer.ReplacerWorker( self.dataset.get_writable_storage(), DummyMetricsBackend(strict=True)) self.project_id = 1 self.event = get_raw_event()
def setup_method(self): from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.app.post = partial(self.app.post, headers={"referer": "test"}) self.storage = get_writable_storage(StorageKey.ERRORS) self.replacer = replacer.ReplacerWorker( self.storage, DummyMetricsBackend(strict=True)) self.project_id = 1 self.event = get_raw_event() settings.ERRORS_ROLLOUT_ALL = True settings.ERRORS_ROLLOUT_WRITABLE_STORAGE = True
def setup_method(self) -> None: from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.storage = get_writable_storage(StorageKey.ERRORS) self.replacer = replacer.ReplacerWorker( self.storage, CONSUMER_GROUP, DummyMetricsBackend(strict=True), ) self.project_id = 1 self.event = get_raw_event()
def setup_method(self) -> None: from snuba.web.views import application assert application.testing is True self.app = application.test_client() self.storage = get_writable_storage(StorageKey.ERRORS) self.replacer = replacer.ReplacerWorker( self.storage, CONSUMER_GROUP, DummyMetricsBackend(strict=True), ) # Total query time range is 24h before to 24h after now to account # for local machine time zones self.from_time = datetime.now().replace( minute=0, second=0, microsecond=0) - timedelta(days=1) self.to_time = self.from_time + timedelta(days=2) self.project_id = 1 self.event = get_raw_event()
def setup_method(self, test_method): from snuba.web.views import application assert application.testing is True application.config["PROPAGATE_EXCEPTIONS"] = False self.app = application.test_client()