hhru/frontik — pull request #34 by AndreySumin (2013-01-14 13:16:50+00:00)
Title: HH-29734 test infrastructure in frontik

Пулл-реквест обновлен, продолжение старой ветки. Теперь умеет генерировать артефакты в виде эталонных request/response после прогона тестов.

```python
routes = [
('route_name', r'url_path', service_mock_function),
('vacancy_search', r'/SearchService/VacancySearch', post_proto_search)
]

# config is a frontik config stub
test_env = frontik.testing.TestEnvironment(module, test_module, routes, config,
# here come additional properties for PageHandler object and common headers
session=applicant_session, headers={'X-HH-Snapshot': 'TEST-SNAPSHOT'})

app = test_env.create_test_app(more_handler_properties={})

# optional: provide sample data to service mocks
app.set_route_data('vacancy_search', vacancies=vacancies)

http_request = Get('/search_vacancy', data_dict, headers_dict)
response = app.call_url(http_request)

assert response.code == 200
```