示例#1
0
def get_songs_average_difficulty():
    songs_library = Songs(Songs.TEST_FILE)
    return songs_library.get_average_difficulty()
示例#2
0
 def test_get_average_difficulty(self):
     songs_library = Songs(Songs.TEST_FILE)
     avg_difficulty = json.loads(songs_library.get_average_difficulty())['avg_difficulty']
     self.assertEqual(12.93, avg_difficulty)