def test_create_file(self):
     with open('filename.txt', 'w') as file:
         file.write('blablablablablablablablablablablabbl')
     LSBEncoder._check_the_opportunity_to_enter = \
         MagicMock(return_value=True)
     lsb = LSBEncoder(['filename.txt'], 'filename.txt', 0)
     result = lsb.create_new_wav()
     os.remove('filename.txt')
     self.assertIsNone(result)
 def main(self):
     parser = self.parse_args(sys.argv[1:])
     if parser.encode and parser.decode:
         raise Exception("This keys shouldn't be used at the same time")
     if parser.encode:
         files = parser.file
         wav_path = ' '.join(parser.wav)
         if len(files) == 0 or len(wav_path) == 0:
             raise Exception('Not all arguments are specified. Try again!')
         lsb = LSBEncoder(files, wav_path)
         lsb.inscribe()
         lsb.create_new_wav()
         return
     if parser.decode:
         wav_path = ' '.join(parser.wav)
         if len(wav_path) == 0:
             raise Exception('Not all arguments are specified. Try again!')
         lsb = LSBDecoder(wav_path)
         lsb.get_hidden_information()