Esempio n. 1
0
 def test_it_should_use_color_code_to_the_specified_color(
         self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print", "RED")
     self.assertEqual("\x1b[31mmessage to print\x1b[0m\n",
                      stdout_mock.getvalue())
Esempio n. 2
0
 def test_it_should_call_print_statment_with_the_given_message_and_color_codes_when_colors_are_on(
         self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print")
     self.assertEqual("\x1b[36mmessage to print\x1b[0m\n",
                      stdout_mock.getvalue())
Esempio n. 3
0
 def test_it_should_call_print_statment_with_the_given_message(
         self, stdout_mock):
     CLI.msg("message to print")
     self.assertEqual("message to print\n", stdout_mock.getvalue())
Esempio n. 4
0
 def test_it_should_use_color_code_to_the_specified_color(self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print", "RED")
     self.assertEqual("\x1b[31mmessage to print\x1b[0m\n", stdout_mock.getvalue())
Esempio n. 5
0
 def test_it_should_call_print_statment_with_the_given_message_and_color_codes_when_colors_are_on(self, stdout_mock):
     CLI.show_colors()
     CLI.msg("message to print")
     self.assertEqual("\x1b[36mmessage to print\x1b[0m\n", stdout_mock.getvalue())
Esempio n. 6
0
 def test_it_should_call_print_statment_with_the_given_message(self, stdout_mock):
     CLI.msg("message to print")
     self.assertEqual("message to print\n", stdout_mock.getvalue())