Esempio n. 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})
Esempio n. 2
0
File: pm.py Progetto: 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})
Esempio n. 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})
Esempio n. 4
0
File: pm.py Progetto: 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})