def test_install_url(self):
     app = Addon()
     self.assertIsNone(app.install_url())
     app.save()
     url = reverse('hipchat:install', kwargs={'app_id': app.id})
     self.assertEqual(app.install_url(), get_full_url(url))
 def test_get_full_url(self):
     self.assertEqual(get_full_url("foo"), "https://foo.com/foo")
     self.assertEqual(get_full_url("/foo"), "https://foo.com/foo")
 def test_descriptor_url(self):
     app = Addon()
     self.assertIsNone(app.descriptor_url())
     app.save()
     url = get_full_url(app.get_absolute_url())
     self.assertEqual(app.descriptor_url(), url)
 def test_query_url(self):
     obj = Glance(app=self.app).save()
     self.assertEqual(obj.query_url(), get_full_url(obj.get_absolute_url()))
     obj.data_url = "http://www.example.com"
     self.assertEqual(obj.query_url(), "http://www.example.com")