def test_get_geojson_no_signals_in_category(self): """ Return an empty FeatureCollection because there are no signals in the category """ parent_category = ParentCategoryFactory.create() child_category = CategoryFactory.create( parent=parent_category, public_name='Public category for testing', is_public_accessible=True) SignalFactoryValidLocation.create_batch(5) response = self.client.get( f'{self.geography_endpoint}/?maincategory_slug={parent_category.slug}' f'&category_slug={child_category.slug}&bbox=4.700000,52.200000,5.000000,52.500000' ) self.assertEqual(200, response.status_code) self.assertEqual(0, int(response.headers['X-Total-Count'])) data = response.json() self.assertIsNone(data['features'])
def setUp(self): self.signal = SignalFactoryValidLocation.create() # Some Signals that should not have and get any log rules during these tests self.signals_no_log = SignalFactoryValidLocation.create_batch(4)