def test_scan_module_only_submodule(): config = setup() from morepath.tests.fixtures.scanmodule import submodule, theapp from morepath.tests.fixtures import scanmodule config.scan(submodule, recursive=False) config.scan(theapp, recursive=False) config.commit() c = Client(scanmodule.app()) c.get('/', status=404) response = c.get('/foo') assert response.body == b'The view for model: foo'
def test_scan_module_only_init(): config = setup() from morepath.tests.fixtures import scanmodule from morepath.tests.fixtures.scanmodule import theapp config.scan(scanmodule, recursive=False) config.scan(theapp, recursive=False) config.commit() c = Client(scanmodule.app()) response = c.get('/') assert response.body == b'The root: ROOT' c.get('/foo', status=404)