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

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

src/f/t/ftw.geo-1.3/ftw/geo/tests/test_dexterity.py   ftw.geo(Download)
from collective.geo.contentlocations.interfaces import IGeoManager
from collective.geo.geographer.interfaces import IGeoreferenceable
from ftw.geo.interfaces import IGeocodableLocation
from ftw.geo.testing import GEO_FUNCTIONAL_TESTING
from ftw.geo.tests.helpers import ExpectGeocodingRequest
    def test_geocoding_triggered_when_creating_object(self, browser):
        browser.login().open()
        factoriesmenu.add('Address')
        with ExpectGeocodingRequest():
            browser.fill({'Address': 'Bern, Switzerland'}).submit()
    def test_geocoding_triggered_when_editing(self, browser):
        browser.login().open()
        factoriesmenu.add('Address')
        with ExpectGeocodingRequest():
            browser.fill({'Address': 'Bern, Switzerland'}).submit()
        statusmessages.assert_no_error_messages()
        obj = self.portal.get('address')
 
        browser.find('Edit').click()
        with ExpectGeocodingRequest('Zurich, Switzerland', (8.53918, 47.36864)):

src/f/t/ftw.geo-1.3/ftw/geo/tests/test_archetypes.py   ftw.geo(Download)
from ftw.geo.interfaces import IGeocodableLocation
from ftw.geo.testing import GEO_FUNCTIONAL_TESTING
from ftw.geo.tests.helpers import ExpectGeocodingRequest
from ftw.testbrowser import browsing
from ftw.testbrowser.pages import factoriesmenu
    def test_geocoding_triggered_when_creating_object(self, browser):
        browser.login().open()
        factoriesmenu.add('Page')
        with ExpectGeocodingRequest():
            browser.fill({'Title': 'Bern, Switzerland'}).submit()
    def test_geocoding_triggered_when_editing_address(self, browser):
        browser.login().open()
        factoriesmenu.add('Page')
        with ExpectGeocodingRequest():
            browser.fill({'Title': 'Bern, Switzerland'}).submit()
        statusmessages.assert_no_error_messages()
        obj = self.portal.get('bern-switzerland')
 
        browser.find('Edit').click()
        with ExpectGeocodingRequest('Zurich, Switzerland', (8.53918, 47.36864)):