Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(8)  |  Call(8)  |  Derive(0)  |  Import(0)

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/picasa.py   py2FaceR(Download)
    def testBasicContact(self):
        contact = picasa.Contact('Bob Smith', emails='email@server.com', google_hash='testhash')
        self.assertEqual(type(contact.emails), list)
        contact = picasa.Contact('Bob Smith', emails=['email@server.com', 'email2@server.com'], google_hash='testhash')
        self.assertEqual(type(contact.emails), list)
        contact = picasa.Contact('Bob Smith', emails=('email@server.com', 'email2@server.com'), google_hash='testhash' )

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/flickr.py   py2FaceR(Download)
    def addSimpleContact(self):
        contact = picasa.Contact('bob', ['bob@gmail.com'], 'simplehash')
        self.picasa_contacts._contacts[contact.google_hash] = contact
 
    def testNoProxy(self):
        self.assertEqual(1, self.contactmgr.session.query(FlickrContact).count())
        # Add a new contact, then sync and expect both hashes, but one nsid
        contact = picasa.Contact('bob2', ['bob2@gmail.com'], 'simplehash2')
        self.flickr_api_mgr.xml_to_result(self.CONTACT_NOTFOUND)
        self.picasa_contacts._contacts[contact.google_hash] = contact
    def testSyncMultiEmail(self):
        contact = picasa.Contact('bob2', ['bob2@hotmail.com', 'bob2@gmail.com'], 'simplehash2')
        self.picasa_contacts._contacts[contact.google_hash] = contact
        self.flickr_api_mgr.xml_to_result((self.CONTACT_NOTFOUND, self.CONTACT_FOUND))
        self.contactmgr.sync_flickr(self.picasa_contacts, 
    def syncface(self, img):
        picasa_contacts = picasa.ContactParser()
        picasa_faceparser = picasa.FaceParser()
        contactmgr = FlickrContactManager(db_proxy=self.db_proxy)
        contact = picasa.Contact('bob', ['bob@gmail.com'], 'contact_hash')

src/p/y/py2FaceR-0.1.1/src/py2facer/tests/image.py   py2FaceR(Download)
    def testBasic(self):
        picasacontact = picasa.Contact('bob', ['bob@gmail.com'], 'simplehash')
        img = image.Image(image_path=tests.TESTFILES['img'])
        img.add_face(google_id=picasacontact)
        self.assertEqual(len(img.people), 1)