modified diagram
This commit is contained in:
parent
7ee02440c8
commit
6d2a7469fc
18
README.md
18
README.md
@ -156,21 +156,21 @@ Source {
|
||||
|
||||
}
|
||||
|
||||
Source }o--|| Song : from
|
||||
Source }o--|| Lyrics : from
|
||||
Source }o--|| Album : from
|
||||
Source }o--|| Artist : from
|
||||
Source }o--|| Label : from
|
||||
Source }o--|| Song : ""
|
||||
Source }o--|| Lyrics : ""
|
||||
Source }o--|| Album : ""
|
||||
Source }o--|| Artist : ""
|
||||
Source }o--|| Label : ""
|
||||
|
||||
Song }o--o{ Album : AlbumSong
|
||||
Album }o--o{ Artist : ArtistAlbum
|
||||
Song }o--o{ Artist : features
|
||||
Song }o--o{ Artist : "ArtistSong (features)"
|
||||
|
||||
Label }o--o{ Album : LabelAlbum
|
||||
Label }o--o{ Artist : LabelSong
|
||||
|
||||
Song ||--o{ Lyrics : contains
|
||||
Song ||--o{ Target : points
|
||||
Song ||--o{ Lyrics : ""
|
||||
Song ||--o{ Target : ""
|
||||
```
|
||||
|
||||
Ok now this **WILL** look intimidating, thus I break it down quickly.
|
||||
@ -216,7 +216,7 @@ Label {
|
||||
|
||||
Song }o--o{ Album : AlbumSong
|
||||
Album }o--o{ Artist : ArtistAlbum
|
||||
Song }o--o{ Artist : features
|
||||
Song }o--o{ Artist : "ArtistSong (features)"
|
||||
|
||||
Label }o--o{ Album : LabelAlbum
|
||||
Label }o--o{ Artist : LabelSong
|
||||
|
@ -169,6 +169,42 @@ class TestCollection(unittest.TestCase):
|
||||
self.assertIn(song.unified_title, self.unified_titels)
|
||||
|
||||
|
||||
class TestCollectionAppending(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.song_list: objects.song = [
|
||||
objects.Song(title="hasskrank"),
|
||||
objects.Song(title="HaSSkrank"),
|
||||
objects.Song(title="Suicideseason", isrc="uniqueID"),
|
||||
objects.Song(title="same isrc different title", isrc="uniqueID")
|
||||
]
|
||||
self.unified_titels = set(song.unified_title for song in self.song_list)
|
||||
|
||||
def test_appending(self):
|
||||
collection = objects.Collection(
|
||||
element_type=objects.Song,
|
||||
data=self.song_list
|
||||
)
|
||||
|
||||
res = collection.append(self.song_list[0])
|
||||
self.assertEqual(res.was_in_collection, False)
|
||||
self.assertEqual(res.current_element, self.song_list[0])
|
||||
|
||||
res = collection.append(self.song_list[1])
|
||||
self.assertEqual(res.was_in_collection, True)
|
||||
self.assertEqual(res.current_element, self.song_list[0])
|
||||
|
||||
res = collection.append(self.song_list[2])
|
||||
self.assertEqual(res.was_in_collection, False)
|
||||
self.assertEqual(res.current_element, self.song_list[2])
|
||||
|
||||
res = collection.append(self.song_list[3])
|
||||
self.assertEqual(res.was_in_collection, True)
|
||||
self.assertEqual(res.current_element, self.song_list[2])
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
class TestLyrics(unittest.TestCase):
|
||||
|
Loading…
Reference in New Issue
Block a user