Beispiel #1
0
    def test_get_reader_static_file(self):
        method = WindowsPXEBootMethod()
        mock_path = factory.make_name("path")
        mock_output_static = self.patch(method, "output_static")
        kernel_params = make_kernel_parameters(osystem="windows")

        method.get_reader(None, kernel_params, path=mock_path)
        self.assertThat(mock_output_static,
                        MockCalledOnceWith(kernel_params, mock_path))
Beispiel #2
0
    def test_get_reader_bcd(self):
        method = WindowsPXEBootMethod()
        mock_compose_bcd = self.patch(method, 'compose_bcd')
        local_host = factory.make_ipv4_address()
        kernel_params = make_kernel_parameters(osystem='windows')

        method.get_reader(
            None, kernel_params, path='bcd', local_host=local_host)
        self.assertThat(
            mock_compose_bcd, MockCalledOnceWith(kernel_params, local_host))