@@ -60,16 +60,25 @@ def test_main_generate_two_factor(self):
6060 self .assertEqual (len (sout .getvalue ().rstrip ('\n ' )), 6 )
6161 with redirect_stdout (StringIO ()) as sout :
6262 command_line_parser (cmd_args = ["test3" ])
63- self .assertEqual (sout .getvalue ().split ("\n " ), "The service 'test3' does not exist." )
63+ self .assertEqual (
64+ sout .getvalue ().split ("\n " )[0 ],
65+ "The service \" test3\" does not exist."
66+ )
6467
6568 def test_main_generate_qr_code (self ):
6669 with redirect_stdout (StringIO ()) as sout :
6770 command_line_parser (cmd_args = ["-qr" , "test" ])
68- self .assertEqual (sout .getvalue (), "The qrcode file <test.png> was generated.\n " )
71+ self .assertEqual (
72+ sout .getvalue (),
73+ "The qrcode file <test.png> was generated.\n "
74+ )
6975 self .assertTrue (os .path .exists ("test.png" ))
7076 with redirect_stdout (StringIO ()) as sout :
7177 command_line_parser (cmd_args = ["-a" , "test.png" , "test4" ])
72- self .assertEqual (sout .getvalue (), "The service 'test4' was added, from file <test.png>.\n " )
78+ self .assertEqual (
79+ sout .getvalue (),
80+ "The service 'test4' was added, from file <test.png>.\n "
81+ )
7382 with open (self .config_path , "r" ) as f :
7483 config_dict = json .load (f )
7584 self .assertTrue ("test4" in config_dict .keys ())
0 commit comments