예제 #1
0
파일: test.py 프로젝트: prymitive/pumpkin
 def test_pickle(self):
     """Test pickling and unpickling model instances
     """
     s = pickle_object(qa)
     obj = unpickle_object(s, LDAP_CONN)
     self.assertEqual(obj.string, u"Max Blank")
     self.assertEqual(obj.dn, "cn=Max Blank,ou=users,dc=company,dc=com")
예제 #2
0
 def pickle(self):
     """Returns list of pickled objects
     """
     return [pickle_object(obj) for obj in self]