def test_site_region_negation(self): params = {'region__n': ['region-1']} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)
def test_site_region_id_negation(self): params = {'region_id__n': [Region.objects.first().pk]} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)
def test_site_asn_gte(self): params = {'asn__gte': [65101]} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)
def test_site_slug_endswith_negation(self): params = {'slug__niew': ['-1']} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)
def test_site_slug_startswith(self): params = {'slug__isw': ['abc']} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 1)
def test_site_slug_icontains_negation(self): params = {'slug__nic': ['-1']} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)
def test_site_name_negation(self): params = {'name__n': ['Site 1']} self.assertEqual( SiteFilterSet(params, self.site_queryset).qs.count(), 2)