Beispiel #1
0
 def test_version_extended_info(self):
     handler = GeneralHandler(factory.make_User(), {}, None)
     self.patch_autospec(
         general,
         "get_running_version").return_value = MAASVersion.from_string(
             "1.2.3-456-g.deadbeef")
     self.assertEqual(handler.version({}), "1.2.3 (456-g.deadbeef)")
Beispiel #2
0
 def test_version(self):
     handler = GeneralHandler(factory.make_User(), {}, None)
     self.patch_autospec(
         general,
         "get_running_version").return_value = MAASVersion.from_string(
             "1.2.3~rc1")
     self.assertEqual(handler.version({}), "1.2.3~rc1")
Beispiel #3
0
 def test_version(self):
     handler = GeneralHandler(factory.make_User(), {})
     self.patch_autospec(
         general, "get_maas_version_ui").return_value = sentinel.version
     self.assertEqual(sentinel.version, handler.version({}))