def sn_backends_getter_ok(): sn_backend1 = StreetNetworkBackend(id='kraken') sn_backend1.klass = 'jormungandr.street_network.tests.StreetNetworkBackendMock' sn_backend1.args = {'url': 'kraken.url'} sn_backend1.created_at = datetime.datetime.utcnow() sn_backend2 = StreetNetworkBackend(id='asgard') sn_backend2.klass = 'jormungandr.street_network.tests.StreetNetworkBackendMock' sn_backend2.args = {'url': 'asgard.url'} return [sn_backend1, sn_backend2]
def sn_backends_getter(self): kraken = StreetNetworkBackend(id='kraken') kraken.klass = "jormungandr.street_network.tests.MockKraken" kraken.args = {'timeout': 10} kraken.created_at = datetime.datetime.utcnow() return [kraken]
def sn_backends_getter_wrong_class(): sn_backend = StreetNetworkBackend(id='kraken') sn_backend.klass = 'jormungandr/street_network/tests/StreetNetworkBackendMock' sn_backend.args = {'url': 'kraken.url'} return [sn_backend]
def sn_backends_getter_update(): sn_backend = StreetNetworkBackend(id='kraken') sn_backend.klass = 'jormungandr.street_network.tests.StreetNetworkBackendMock' sn_backend.args = {'url': 'kraken.url.UPDATE'} sn_backend.updated_at = datetime.datetime.utcnow() return [sn_backend]