Esempio n. 1
0
 def test_post(self):
     self.mock_login_admin()
     response = self.post('/ag_update_geocode/', {'retry': '0',
                                                  'limit': '-1'})
     self.assertEqual(response.code, 200)
     for stat in db.getGeocodeStats():
         self.assertIn("<td>%s</td><td>%s</td>" % stat, response.body)
Esempio n. 2
0
    def post(self):
        retry = int(self.get_argument("retry", 0))
        limit = int(self.get_argument('limit', -1))
        limit = None if limit == -1 else limit
        db.addGeocodingInfo(limit, retry)
        stats = db.getGeocodeStats()

        self.render("ag_update_geocode.html", stats=stats,
                    currentuser=self.current_user)
 def test_post(self):
     self.mock_login_admin()
     response = self.post('/ag_update_geocode/', {
         'retry': '0',
         'limit': '10'
     })
     self.assertEqual(response.code, 200)
     for stat in db.getGeocodeStats():
         self.assertIn("<td>%s</td><td>%s</td>" % stat, response.body)
    def post(self):
        retry = int(self.get_argument("retry", 0))
        limit = int(self.get_argument('limit', -1))
        limit = None if limit == -1 else limit
        db.addGeocodingInfo(limit, retry)
        stats = db.getGeocodeStats()

        self.render("ag_update_geocode.html",
                    stats=stats,
                    currentuser=self.current_user)
Esempio n. 5
0
    def test_get(self):
        self.mock_login()
        response = self.get('/ag_update_geocode/')
        self.assertEqual(response.code, 200)

        # check that correct information is printed on HTML page.
        result = db.getGeocodeStats()
        for i in range(len(result)):
            self.assertIn('<td>%s</td><td>%s</td>'
                          % (result[i][0], result[i][1]), response.body)
    def test_get(self):
        self.mock_login()
        response = self.get('/ag_update_geocode/')
        self.assertEqual(response.code, 200)

        # check that correct information is printed on HTML page.
        result = db.getGeocodeStats()
        for i in range(len(result)):
            self.assertIn(
                '<td>%s</td><td>%s</td>' % (result[i][0], result[i][1]),
                response.body)
Esempio n. 7
0
 def get(self):
     stats = db.getGeocodeStats()
     self.render("ag_update_geocode.html", stats=stats,
                 currentuser=self.current_user)
 def get(self):
     stats = db.getGeocodeStats()
     self.render("ag_update_geocode.html",
                 stats=stats,
                 currentuser=self.current_user)