Beispiel #1
0
 def test_browse(self):
     lg = LocationGenome(TEST_KEY)
     result = lg.browse(lat=47.615886,
         long=-122.323427,
         radius=1,
         category='Coffee',
         sort='distance',
         outputfields=('documentid','Title','StandardCategory'))
Beispiel #2
0
 def test_recommend(self):
     lg = LocationGenome(TEST_KEY)
     result = lg.recommend(lat=47.615886,
         long=-122.323427,
         radius=1,
         rows=1,
         userid='*****@*****.**',
         category='Breakfast',
         outputfields=('documentid','Title','Address_Street'))
     results = result.results
Beispiel #3
0
 def test_feedback(self):
     lg = LocationGenome(TEST_KEY)
     result = lg.search(lat=47.615886,
         long=-122.323427,
         radius=1,
         rows=1,
         title='Molly Moon',
         outputfields=('documentid','Title','Address_Street'))
     doc = result.results[0]
     result = lg.feedback(documentid=doc['documentid'],
         userid='*****@*****.**',
         action='LIKE')
     results = result.results
Beispiel #4
0
 def test_related(self):
     lg = LocationGenome(TEST_KEY)
     result = lg.search(lat=47.615886,
         long=-122.323427,
         radius=1,
         rows=1,
         title='Molly Moon',
         outputfields=('documentid','Title','Address_Street'))
     doc = result.results[0]
     result = lg.related(lat=47.615886,
         long=-122.323427,
         radius=2,
         documentid=doc['documentid'],
         outputfields=('documentid','Title','Address_Street'))
     related = result.related
Beispiel #5
0
    def test_search(self):
        lg = LocationGenome(TEST_KEY)
        result = lg.search(lat=47.615886,
            long=-122.323427,
            radius=10,
            title='Molly Moon',
            outputfields='documentid')

        result = lg.search(lat=47.615886,
            long=-122.323427,
            radius=10,
            title='Molly Moon',
            rows=1,
            sort='distance',
            outputfields=('documentid','Title','Address_Street','Address_City','Latitude','Longitude'))
        self.assertEquals(1, len(result.results))
Beispiel #6
0
 def test_flag(self):
     lg = LocationGenome(TEST_KEY)
     result = lg.flag(documentid=3393,
         errortype='Phone',
         correctvalue='4251234567')