예제 #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})