コード例 #1
0
 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)
コード例 #2
0
 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)
コード例 #3
0
ファイル: test_base_model.py プロジェクト: mmai/bookwyrm
 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)
コード例 #4
0
ファイル: test_base_model.py プロジェクト: mmai/bookwyrm
 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)