Exemple #1
0
 def test_from_remote_profile_relative_image_url(self):
     remote_profile = BaseProfileFactory(public=False)
     remote_profile.handle = "foo@localhost"
     remote_profile.image_urls["small"] = "/sm"
     remote_profile.image_urls["medium"] = "/me"
     remote_profile.image_urls["large"] = "/lg"
     profile = Profile.from_remote_profile(remote_profile)
     self.assertEqual(profile.image_url_small, "https://localhost/sm")
     self.assertEqual(profile.image_url_medium, "https://localhost/me")
     self.assertEqual(profile.image_url_large, "https://localhost/lg")
Exemple #2
0
 def test_from_remote_profile_absolute_image_url(self):
     remote_profile = BaseProfileFactory(public=False)
     remote_profile.handle = "foo@localhost"
     remote_profile.image_urls["small"] = "https://example1.com/sm"
     remote_profile.image_urls["medium"] = "https://example2.com/me"
     remote_profile.image_urls["large"] = "https://example3.com/lg"
     profile = Profile.from_remote_profile(remote_profile)
     self.assertEqual(profile.image_url_small, "https://example1.com/sm")
     self.assertEqual(profile.image_url_medium, "https://example2.com/me")
     self.assertEqual(profile.image_url_large, "https://example3.com/lg")
Exemple #3
0
 def test_from_remote_profile_relative_image_url(self):
     remote_profile = BaseProfileFactory(public=False)
     remote_profile.handle = "*****@*****.**"
     remote_profile.image_urls["small"] = "/sm"
     remote_profile.image_urls["medium"] = "/me"
     remote_profile.image_urls["large"] = "/lg"
     profile = Profile.from_remote_profile(remote_profile)
     self.assertEqual(profile.image_url_small, "https://example.com/sm")
     self.assertEqual(profile.image_url_medium, "https://example.com/me")
     self.assertEqual(profile.image_url_large, "https://example.com/lg")