Beispiel #1
0
 def test_validate_ip_check_without_name_check(self):
     data = self.valid_data.copy()
     data["ip_check"] = True
     form = VMWizardAdvancedForm(data)
     self.assertFalse(form.is_valid(), "IP check shouldn't be allowed without name check")
Beispiel #2
0
 def test_validate_pnode_equals_snode(self):
     invalid_data = self.valid_data.copy()
     invalid_data["snode"] = invalid_data["pnode"]
     form = VMWizardAdvancedForm(invalid_data)
     self.assertFalse(form.is_valid(), "The secondary node cannot be the primary node.")
Beispiel #3
0
 def test_validate_valid(self):
     form = VMWizardAdvancedForm(self.valid_data)
     self.assertTrue(form.is_valid(), form.errors)