2021-06-23 16:48:10 -04:00
|
|
|
# Copyright 2021 (c) Anna Schumaker.
|
|
|
|
from lib import tagstore
|
|
|
|
from . import tags
|
|
|
|
import unittest
|
|
|
|
|
|
|
|
class TestTags(unittest.TestCase):
|
|
|
|
def test_tags_init(self):
|
|
|
|
self.assertIsInstance(tags.Artist, tagstore.TagStore)
|
2021-06-23 17:14:14 -04:00
|
|
|
self.assertIsInstance(tags.Album, tagstore.TagSuperStore)
|
2021-06-21 14:42:32 -04:00
|
|
|
self.assertIsInstance(tags.Genre, tagstore.TagStore)
|
2021-06-24 10:35:04 -04:00
|
|
|
self.assertIsInstance(tags.Decade, tagstore.TagStore)
|
2021-06-24 11:28:10 -04:00
|
|
|
self.assertIsInstance(tags.Year, tagstore.TagSuperStore)
|
2021-06-23 16:48:10 -04:00
|
|
|
|
|
|
|
def test_tags_reset(self):
|
|
|
|
tags.Artist.store = {"a" : 1 }
|
2021-06-23 17:14:14 -04:00
|
|
|
tags.Album.store = {("a", "b") : 2 }
|
2021-06-21 14:42:32 -04:00
|
|
|
tags.Genre.store = {"c" : 3 }
|
2021-06-24 10:35:04 -04:00
|
|
|
tags.Decade.store = {"d" : 4 }
|
2021-06-23 16:48:10 -04:00
|
|
|
|
|
|
|
tags.reset()
|
|
|
|
self.assertEqual(tags.Artist.store, { })
|
2021-06-23 17:14:14 -04:00
|
|
|
self.assertEqual(tags.Album.store, { })
|
2021-06-21 14:42:32 -04:00
|
|
|
self.assertEqual(tags.Genre.store, { })
|
2021-06-24 10:35:04 -04:00
|
|
|
self.assertEqual(tags.Decade.store, { })
|