'Test add_domain() prefixes domains onto the correct URLs.'

def test_add_domain(self):

    self.assertEqual(views.add_domain(u'example.com', u'/foo/?arg=value'), u'http://example.com/foo/?arg=value')
    self.assertEqual(views.add_domain(u'example.com', u'/foo/?arg=value', True), u'https://example.com/foo/?arg=value')
    self.assertEqual(views.add_domain(u'example.com', u'http://djangoproject.com/doc/'), u'http://djangoproject.com/doc/')
    self.assertEqual(views.add_domain(u'example.com', u'https://djangoproject.com/doc/'), u'https://djangoproject.com/doc/')
    self.assertEqual(views.add_domain(u'example.com', u'mailto:uhoh@djangoproject.com'), u'mailto:uhoh@djangoproject.com')
    self.assertEqual(views.add_domain(u'example.com', u'//example.com/foo/?arg=value'), u'http://example.com/foo/?arg=value')
