Commit bad4afd4 by Bach Dániel

firewall: fix tests

parent 014cda7a
......@@ -716,9 +716,6 @@ class Host(models.Model):
proto=proto, nat=False, action='accept',
host=self, foreign_network=vg)
if self.behind_nat:
if public < 1024:
raise ValidationError(
_("Only ports above 1024 can be used."))
rule.nat_external_port = public
rule.nat = True
rule.full_clean()
......
......@@ -313,11 +313,6 @@ class ReloadTestCase(TestCase):
new_rules = h.rules.count()
self.assertEqual(new_rules, old_rules)
def test_host_add_port_w_validationerror(self):
h = self.h1
self.assertRaises(ValidationError, h.add_port,
'tcp', public=1000, private=22)
def test_periodic_task(self):
# TODO
with patch('firewall.tasks.local_tasks.cache') as cache:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment