Exemple #1
0
 def test_get_parsed_args_missing_album(self):
     parser = get_argument_parser()
     with pytest.raises(SystemExit):
         _ = get_parsed_args(
             parser,
             ['--artist', self.artist],
         )
Exemple #2
0
 def test_get_parsed_args_empty_album(self):
     parser = get_argument_parser()
     artist, album, destination = get_parsed_args(
         parser,
         [
             '--artist',
             self.artist,
             '--album',
             '',
         ],
     )
     assert album == ''
Exemple #3
0
 def test_get_parsed_args_empty_artist(self):
     parser = get_argument_parser()
     with pytest.raises(ValueError):
         _ = get_parsed_args(
             parser,
             [
                 '--artist',
                 '',
                 '--album',
                 self.album,
             ],
         )
Exemple #4
0
 def test_get_parsed_args_without_destination(self):
     parser = get_argument_parser()
     artist, album, destination = get_parsed_args(
         parser,
         [
             '--artist',
             self.artist,
             '--album',
             self.album,
         ],
     )
     assert artist == self.artist
     assert album == self.album
     assert destination == os.getcwd()
Exemple #5
0
 def test_get_argument_parser(self):
     parser = get_argument_parser()
     assert isinstance(parser, argparse.ArgumentParser)