Example #1
0
 def test_returns_success(self, web_track_mock):
     assert translator.valid_web_data(web_track_mock, "track") is True
Example #2
0
 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
Example #3
0
 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
Example #4
0
 def test_returns_false_if_wrong_type(self, web_track_mock):
     assert translator.valid_web_data(web_track_mock, "playlist") is False
Example #5
0
 def test_returns_false_if_empty(self):
     assert translator.valid_web_data({}, "track") is False
Example #6
0
 def test_returns_false_if_none(self):
     assert translator.valid_web_data(None, "track") is False