Debian Codegraph @

test/ui/test_ui_importer.py

raw
1 """Tests the TerminalImportSession. The tests are the same as in the
2
3 test_importer module. But here the test importer inherits from
4 ``TerminalImportSession``. So we test this class, too.
5 """
6
7 from beets import importer
8 from beets.test.helper import TerminalImportMixin
9 from test import test_importer
10
11
12 class TestNonAutotaggedImport(
13 TerminalImportMixin, test_importer.TestNonAutotaggedImport
14 ):
15 pass
16
17
18 class TestImport(TerminalImportMixin, test_importer.TestImport):
19 pass
20
21
22 class ImportSingletonTest(
23 TerminalImportMixin, test_importer.ImportSingletonTest
24 ):
25 pass
26
27
28 class ImportTracksTest(TerminalImportMixin, test_importer.ImportTracksTest):
29 pass
30
31
32 class ImportCompilationTest(
33 TerminalImportMixin, test_importer.ImportCompilationTest
34 ):
35 pass
36
37
38 class ImportExistingTest(TerminalImportMixin, test_importer.ImportExistingTest):
39 pass
40
41
42 class ChooseCandidateTest(
43 TerminalImportMixin, test_importer.ChooseCandidateTest
44 ):
45 pass
46
47
48 class GroupAlbumsImportTest(
49 TerminalImportMixin, test_importer.GroupAlbumsImportTest
50 ):
51 pass
52
53
54 class GlobalGroupAlbumsImportTest(
55 TerminalImportMixin, test_importer.GlobalGroupAlbumsImportTest
56 ):
57 pass
58
59
60 class TestImportDuplicateAlbumUpgrade(
61 TerminalImportMixin, test_importer.TestImportDuplicateAlbumUpgrade
62 ):
63 def setup_beets(self):
64 super().setup_beets()
65 self.config["import"]["duplicate_action"] = "ask"
66 self.importer.add_duplicate_action(importer.DuplicateAction.UPGRADE)