Ejemplo n.º 1
0
    def test_setup_output_file(self, open_mock):

        open_mock.return_value = "handle"
        result = LogsCommandContext._setup_output_file(self.output_file)

        self.assertEquals(result, "handle")
        open_mock.assert_called_with(self.output_file, "wb")
Ejemplo n.º 2
0
    def test_setup_output_file(self, open_mock):

        open_mock.return_value = "handle"
        result = LogsCommandContext._setup_output_file(self.output_file)

        self.assertEquals(result, "handle")
        open_mock.assert_called_with(self.output_file, "wb")
Ejemplo n.º 3
0
 def test_setup_output_file_without_file(self):
     self.assertIsNone(LogsCommandContext._setup_output_file(None))
Ejemplo n.º 4
0
 def test_setup_output_file_without_file(self):
     self.assertIsNone(LogsCommandContext._setup_output_file(None))