示例#1
0
 def test_admin_read(self):
     request = testing.DummyRequest(user=self.user0,
                                    matchdict={"id": self.pm1.id})
     info = pm_read(request)
     self.assertFalse(self.pm1.is_read)
     self.assertDictEqual(info, {"pm": self.pm1})
示例#2
0
文件: pm.py 项目: Azula/votabo
 def test_admin_read(self):
     request = testing.DummyRequest(user=self.user0, matchdict={"id": self.pm1.id})
     info = pm_read(request)
     self.assertFalse(self.pm1.is_read)
     self.assertDictEqual(info, {"pm": self.pm1})
示例#3
0
 def test_owner_read(self):
     request = testing.DummyRequest(user=self.user1,
                                    matchdict={"id": self.pm1.id})
     info = pm_read(request)
     self.assertTrue(self.pm1.is_read)
     self.assertDictEqual(info, {"pm": self.pm1})
示例#4
0
文件: pm.py 项目: Azula/votabo
 def test_owner_read(self):
     request = testing.DummyRequest(user=self.user1, matchdict={"id": self.pm1.id})
     info = pm_read(request)
     self.assertTrue(self.pm1.is_read)
     self.assertDictEqual(info, {"pm": self.pm1})