def test_remote_id_with_user(self): """ format of remote id when there's a user object """ instance = base_model.BookWyrmModel() instance.user = self.local_user instance.id = 1 expected = instance.get_remote_id() self.assertEqual(expected, "https://%s/user/mouse/bookwyrmmodel/1" % DOMAIN)
def test_remote_id_with_user(self): ''' format of remote id when there's a user object ''' user = models.User.objects.create_user('mouse', '*****@*****.**', 'mouseword', local=True) instance = base_model.BookWyrmModel() instance.user = user instance.id = 1 expected = instance.get_remote_id() self.assertEqual(expected, 'https://%s/user/mouse/bookwyrmmodel/1' % DOMAIN)
def test_remote_id_with_user(self): """ format of remote id when there's a user object """ user = models.User.objects.create_user("mouse", "*****@*****.**", "mouseword", local=True, localname="mouse") instance = base_model.BookWyrmModel() instance.user = user instance.id = 1 expected = instance.get_remote_id() self.assertEqual(expected, "https://%s/user/mouse/bookwyrmmodel/1" % DOMAIN)
def test_remote_id(self): """ these should be generated """ instance = base_model.BookWyrmModel() instance.id = 1 expected = instance.get_remote_id() self.assertEqual(expected, "https://%s/bookwyrmmodel/1" % DOMAIN)