Beispiel #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})
Beispiel #2
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})
Beispiel #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})
Beispiel #4
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})