launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #13850
[Merge] lp:~jtv/maas/1.2-pre-1070775 into lp:maas/1.2
Jeroen T. Vermeulen has proposed merging lp:~jtv/maas/1.2-pre-1070775 into lp:maas/1.2.
Commit message:
Shortening some test names; they're all basically identical within the test case, and the bit I remove is implicit in the test case's name. There's one exception but for no obvious reason except to effect the same shortening.
Requested reviews:
Raphaël Badin (rvb)
For more details, see:
https://code.launchpad.net/~jtv/maas/1.2-pre-1070775/+merge/131868
I need the extra line space for an upcoming bug fix!
Jeroen
--
https://code.launchpad.net/~jtv/maas/1.2-pre-1070775/+merge/131868
Your team MAAS Maintainers is subscribed to branch lp:maas/1.2.
=== modified file 'src/maasserver/tests/test_forms.py'
--- src/maasserver/tests/test_forms.py 2012-10-07 11:00:05 +0000
+++ src/maasserver/tests/test_forms.py 2012-10-29 11:47:37 +0000
@@ -678,7 +678,7 @@
class TestNodeGroupWithInterfacesForm(TestCase):
- def test_NodeGroupWithInterfacesForm_creates_pending_nodegroup(self):
+ def test_creates_pending_nodegroup(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
form = NodeGroupWithInterfacesForm(
@@ -694,7 +694,7 @@
nodegroup.nodegroupinterface_set.count(),
))
- def test_NodeGroupWithInterfacesForm_creates_nodegroup_with_status(self):
+ def test_creates_nodegroup_with_status(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
form = NodeGroupWithInterfacesForm(
@@ -704,7 +704,7 @@
nodegroup = form.save()
self.assertEqual(NODEGROUP_STATUS.ACCEPTED, nodegroup.status)
- def test_NodeGroupWithInterfacesForm_validates_parameters(self):
+ def test_validates_parameters(self):
name = factory.make_name('name')
too_long_uuid = 'test' * 30
form = NodeGroupWithInterfacesForm(
@@ -715,7 +715,7 @@
['Ensure this value has at most 36 characters (it has 120).']},
form._errors)
- def test_NodeGroupWithInterfacesForm_rejects_invalid_json_interfaces(self):
+ def test_rejects_invalid_json_interfaces(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
invalid_interfaces = factory.make_name('invalid_json_interfaces')
@@ -727,7 +727,7 @@
{'interfaces': ['Invalid json value.']},
form._errors)
- def test_NodeGroupWithInterfacesForm_rejects_invalid_list_interfaces(self):
+ def test_rejects_invalid_list_interfaces(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
invalid_interfaces = json.dumps('invalid interface list')
@@ -739,7 +739,7 @@
{'interfaces': [INTERFACES_VALIDATION_ERROR_MESSAGE]},
form._errors)
- def test_NodeGroupWithInterfacesForm_rejects_invalid_interface(self):
+ def test_rejects_invalid_interface(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
interface = make_interface_settings()
@@ -753,7 +753,7 @@
"Enter a valid IPv4 or IPv6 address",
form._errors['interfaces'][0])
- def test_NodeGroupWithInterfacesForm_creates_interface_from_params(self):
+ def test_creates_interface_from_params(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
interface = make_interface_settings()
@@ -767,7 +767,7 @@
nodegroup.nodegroupinterface_set.all()[0],
MatchesStructure.byEquality(**interface))
- def test_form_checks_presence_of_other_managed_interfaces(self):
+ def test_checks_presence_of_other_managed_interfaces(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
interfaces = []
@@ -785,7 +785,7 @@
"Only one managed interface can be configured for this cluster",
form._errors['interfaces'][0])
- def test_NodeGroupWithInterfacesForm_creates_multiple_interfaces(self):
+ def test_creates_multiple_interfaces(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
interface1 = make_interface_settings()
@@ -800,7 +800,7 @@
nodegroup = NodeGroup.objects.get(uuid=uuid)
self.assertEqual(2, nodegroup.nodegroupinterface_set.count())
- def test_NodeGroupWithInterfacesForm_populates_cluster_name_default(self):
+ def test_populates_cluster_name_default(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
form = NodeGroupWithInterfacesForm(
@@ -810,7 +810,7 @@
nodegroup = form.save()
self.assertIn(uuid, nodegroup.cluster_name)
- def test_NodeGroupWithInterfacesForm_populates_cluster_name(self):
+ def test_populates_cluster_name(self):
cluster_name = factory.make_name('cluster_name')
uuid = factory.getRandomUUID()
form = NodeGroupWithInterfacesForm(
@@ -820,7 +820,7 @@
nodegroup = form.save()
self.assertEqual(cluster_name, nodegroup.cluster_name)
- def test_NodeGroupWithInterfacesForm_creates_unmanaged_interfaces(self):
+ def test_creates_unmanaged_interfaces(self):
name = factory.make_name('name')
uuid = factory.getRandomUUID()
interface = make_interface_settings()
Follow ups