Skip to content

Commit

Permalink
Add cidr field to test model
Browse files Browse the repository at this point in the history
  • Loading branch information
Ryan P Kilby committed Apr 13, 2017
1 parent d491703 commit ffb7c86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions tests/models.py
Expand Up @@ -131,6 +131,8 @@ class NetworkSetting(models.Model):
ip = models.GenericIPAddressField()
mask = SubnetMaskField()

cidr = models.CharField(max_length=18, blank=True, verbose_name="CIDR")


@python_2_unicode_compatible
class Company(models.Model):
Expand Down
2 changes: 1 addition & 1 deletion tests/test_filterset.py
Expand Up @@ -531,7 +531,7 @@ class Meta:
SubnetMaskField: {'filter_class': CharFilter}
}

self.assertEqual(list(F.base_filters.keys()), ['ip', 'mask'])
self.assertEqual(list(F.base_filters.keys()), ['ip', 'mask', 'cidr'])

def test_custom_declared_field_no_warning(self):
class F(FilterSet):
Expand Down

0 comments on commit ffb7c86

Please sign in to comment.