def test_return_song_but_state_when_user_is_none(self):
     context = learn_button(None, self.song)
     self.assertEqual(context['song'], self.song)
     self.assertEqual(context['state'], None)
 def test_learned_state(self):
     musician_song = models.Song.objects.create(user=self.user,
                                                song=self.song,
                                                state='learned')
     context = learn_button(self.user, self.song)
     self.assertEqual(context['state'], 'learned')
 def test_state_is_empty(self):
     context = learn_button(self.user, self.song)
     self.assertEqual(context['state'], None)
Ejemplo n.º 4
0
 def test_return_song_but_state_when_user_is_none(self):
     context = learn_button(None, self.song)
     self.assertEqual(context['song'], self.song)
     self.assertEqual(context['state'], None)
Ejemplo n.º 5
0
 def test_learned_state(self):
     musician_song = models.Song.objects.create(user=self.user,
                                                song=self.song,
                                                state='learned')
     context = learn_button(self.user, self.song)
     self.assertEqual(context['state'], 'learned')
Ejemplo n.º 6
0
 def test_state_is_empty(self):
     context = learn_button(self.user, self.song)
     self.assertEqual(context['state'], None)