def test_returns_success(self, web_track_mock): assert translator.valid_web_data(web_track_mock, "track") is True
def test_return_false_if_uri_none(self, web_track_mock): web_track_mock["uri"] = None assert translator.valid_web_data(web_track_mock, "track") is False
def test_returns_false_if_missing_uri(self, web_track_mock): del web_track_mock["uri"] assert translator.valid_web_data(web_track_mock, "track") is False
def test_returns_false_if_wrong_type(self, web_track_mock): assert translator.valid_web_data(web_track_mock, "playlist") is False
def test_returns_false_if_empty(self): assert translator.valid_web_data({}, "track") is False
def test_returns_false_if_none(self): assert translator.valid_web_data(None, "track") is False