launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #12165
[Merge] lp:~andreserl/maas/add_get_set_distro_series_tests into lp:maas
Andres Rodriguez has proposed merging lp:~andreserl/maas/add_get_set_distro_series_tests into lp:maas with lp:~andreserl/maas/add_api_parameter_for_ubuntu_series as a prerequisite.
Requested reviews:
MAAS Maintainers (maas-maintainers)
For more details, see:
https://code.launchpad.net/~andreserl/maas/add_get_set_distro_series_tests/+merge/125021
--
https://code.launchpad.net/~andreserl/maas/add_get_set_distro_series_tests/+merge/125021
Your team MAAS Maintainers is requested to review the proposed merge of lp:~andreserl/maas/add_get_set_distro_series_tests into lp:maas.
=== modified file 'src/maasserver/tests/test_node.py'
--- src/maasserver/tests/test_node.py 2012-08-24 10:28:29 +0000
+++ src/maasserver/tests/test_node.py 2012-09-18 18:54:19 +0000
@@ -24,6 +24,7 @@
NODE_STATUS,
NODE_STATUS_CHOICES,
NODE_STATUS_CHOICES_DICT,
+ DISTRO_SERIES,
)
from maasserver.exceptions import NodeStateViolation
from maasserver.models import (
@@ -113,6 +114,18 @@
offset += timedelta(1)
self.assertEqual(macs[0], node.get_primary_mac().mac_address)
+ def test_get_distro_series_returns_default_series(self):
+ node = factory.make_node()
+ # default_distro_series is DISTRO_SERIES.precise
+ series = DISTRO_SERIES.precise
+ self.assertEqual(series, node.get_distro_series())
+
+ def test_set_get_distro_series_returns_series(self):
+ node = factory.make_node()
+ series = DISTRO_SERIES.quantal
+ node.set_distro_series(series)
+ self.assertEqual(series, node.get_distro_series())
+
def test_delete_node_deletes_related_mac(self):
node = factory.make_node()
mac = node.add_mac_address('AA:BB:CC:DD:EE:FF')
Follow ups