def test_parse_badges(): raw_badges = coderwall.parse_json_data(get_mock_data())[3] badges = coderwall.parse_badges(raw_badges) assert len(badges) == 2 assert badges[0].name == 'Test Badge 1' assert badges[0].image_uri == 'http://test.badge1'
def test_parse_json_data(): result = coderwall.parse_json_data(get_mock_data()) assert result[0] == 'Cameron Currie' assert result[1] == 'Texas' assert result[2] == 7 assert len(result[3]) == 2 assert result[3][0]['name'] == 'Test Badge 1' assert result[3][0]['badge'] == 'http://test.badge1'