def test_create_short_dict_makes_thumb_bigger_75(self): builder = SubmissionBuilder(thumb_size=75) big_thumb_link = builder.thumbnail_url.replace("@75-", "@1600-") submission = FASubmission.from_short_dict( builder.build_search_json() ) assert submission.thumbnail_url == big_thumb_link
def test_create_from_short_dict(self): builder = SubmissionBuilder() submission = FASubmission.from_short_dict( builder.build_search_json() ) assert isinstance(submission, FASubmissionShort) assert submission.submission_id == builder.submission_id assert submission.link == builder.link assert submission.thumbnail_url == builder.thumbnail_url assert submission.title == builder.title assert submission.author.profile_name == builder.author.profile_name assert submission.author.name == builder.author.name assert submission.author.link == builder.author.link