launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #06693
[Merge] lp:~rvb/maas/maas-test-fix-api into lp:maas
Raphaël Badin has proposed merging lp:~rvb/maas/maas-test-fix-api into lp:maas.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
For more details, see:
https://code.launchpad.net/~rvb/maas/maas-test-fix-api/+merge/97434
Fix test_POST_new_power_type_defaults_to_asking_config and test_POST_new_sets_power_type (src/maasserver/tests/test_api.py) that were created right before 'architecture' became a mandatory parameter of the node enlistment API call.
--
https://code.launchpad.net/~rvb/maas/maas-test-fix-api/+merge/97434
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~rvb/maas/maas-test-fix-api into lp:maas.
=== modified file 'src/maasserver/tests/test_api.py'
--- src/maasserver/tests/test_api.py 2012-03-14 15:30:44 +0000
+++ src/maasserver/tests/test_api.py 2012-03-14 15:52:21 +0000
@@ -81,9 +81,11 @@
self.assertEqual(architecture, diane.architecture)
def test_POST_new_power_type_defaults_to_asking_config(self):
+ architecture = factory.getRandomChoice(ARCHITECTURE_CHOICES)
response = self.client.post(
self.get_uri('nodes/'), {
'op': 'new',
+ 'architecture': architecture,
'mac_addresses': ['00:11:22:33:44:55'],
})
node = Node.objects.get(
@@ -91,9 +93,11 @@
self.assertEqual(POWER_TYPE.DEFAULT, node.power_type)
def test_POST_new_sets_power_type(self):
+ architecture = factory.getRandomChoice(ARCHITECTURE_CHOICES)
response = self.client.post(
self.get_uri('nodes/'), {
'op': 'new',
+ 'architecture': architecture,
'power_type': POWER_TYPE.VIRSH,
'mac_addresses': ['00:11:22:33:44:55'],
})