def get_songs_average_difficulty(): songs_library = Songs(Songs.TEST_FILE) return songs_library.get_average_difficulty()
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)