Skip to content

Commit

Permalink
shuffle before sorting
Browse files Browse the repository at this point in the history
  • Loading branch information
BeritJanssen committed Dec 21, 2023
1 parent 8098d97 commit 3677ad4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/experiment/rules/tests/test_musical_preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ def test_preferred_songs(self):
session=self.session
)
mp = MusicalPreferences()
preferred_sections = mp.get_preferred_songs(self.session.result_set, 3)
preferred_sections = mp.get_preferred_songs(
self.session.result_set.order_by('?'), 3)
assert preferred_sections[0]['artist'] == 'SuperArtist'
assert preferred_sections[1]['name'] == 'MehSong'
assert preferred_sections[2]['artist'] == 'MehArtist'
Expand Down

0 comments on commit 3677ad4

Please sign in to comment.