コード例 #1
0
 def test_links_bootloaders(self):
     path = self.make_dir()
     mocks = [
         self.patch(bootloader, "link_bootloader")
         for _, bootloader in BootMethodRegistry
     ]
     upgrade_cluster.create_bootloader_sym_links(path)
     for mock in mocks:
         self.assertThat(mock, MockCalledOnceWith(path))
コード例 #2
0
 def test_does_nothing_if_no_tftp_root(self):
     non_existing_path = os.path.join("/tmp", factory.make_name())
     mocks = [
         self.patch(bootloader, "link_bootloader")
         for _, bootloader in BootMethodRegistry
     ]
     upgrade_cluster.create_bootloader_sym_links(non_existing_path)
     for mock in mocks:
         self.assertThat(mock, MockNotCalled())