@@ -88,14 +88,14 @@ def test_corrupt_2(self):
8888# we should die here because exception is what we expect to happen
8989self .assertEqual (
90901 ,0 ,
91- "Expecting Error because backup corrupted.\n "
91+ "Expecting Error because backup corrupted."
9292" Output: {0}\n CMD: {1}" .format (
9393repr (self .output ),self .cmd
9494 )
9595 )
9696except ProbackupException as e :
9797self .assertIn (
98- 'data files are corrupted\n ' ,
98+ 'data files are corrupted' ,
9999e .message ,
100100'\n Unexpected Error Message: {0}\n '
101101' CMD: {1}' .format (repr (e .message ),self .cmd )
@@ -127,9 +127,15 @@ def test_no_control_file(self):
127127backup_id ,"backup.control" )
128128os .remove (file )
129129
130+ output = self .show_pb (backup_dir ,'node' ,as_text = True ,as_json = False )
131+
132+ self .assertIn (
133+ 'Control file' ,
134+ output )
135+
130136self .assertIn (
131- 'Control file "{0}" doesn\' t exist' . format ( file ) ,
132- self . show_pb ( backup_dir , 'node' , as_text = True , as_json = False ) )
137+ 'doesn\' t exist' ,
138+ output )
133139
134140# Clean after yourself
135141self .del_test_dir (module_name ,fname )
@@ -157,9 +163,15 @@ def test_empty_control_file(self):
157163fd = open (file ,'w' )
158164fd .close ()
159165
166+ output = self .show_pb (backup_dir ,'node' ,as_text = True ,as_json = False )
167+
168+ self .assertIn (
169+ 'Control file' ,
170+ output )
171+
160172self .assertIn (
161- 'Control file "{0}" is empty' . format ( file ) ,
162- self . show_pb ( backup_dir , 'node' , as_text = True , as_json = False ) )
173+ 'is empty' ,
174+ output )
163175
164176# Clean after yourself
165177self .del_test_dir (module_name ,fname )
@@ -190,7 +202,7 @@ def test_corrupt_control_file(self):
190202fd .close ()
191203
192204self .assertIn (
193- 'WARNING: Invalid option "statuss" in file' . format ( file ) ,
205+ 'WARNING: Invalid option "statuss" in file' ,
194206self .show_pb (backup_dir ,'node' ,as_json = False ,as_text = True ))
195207
196208# Clean after yourself