Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@

## Changelog

### 1.6.2 (Unreleased)
### 1.7.0
* pytest-server-fixtures: if host not defined, use localhost

### 1.6.2 (2019-02-21)
* pytest-server-fixtures: suppress stacktrace if kill() is called
* pytest-server-fixtures: fix random port logic in TestServerV2

Expand Down
5 changes: 4 additions & 1 deletion pytest-server-fixtures/pytest_server_fixtures/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ class FixtureConfig(Config):
)

# Default values for system resource locations - patch this to change defaults
DEFAULT_SERVER_FIXTURES_HOSTNAME = socket.gethostbyname(socket.gethostname())
try:
DEFAULT_SERVER_FIXTURES_HOSTNAME = socket.gethostbyname(socket.gethostname())
except socket.gaierror:
DEFAULT_SERVER_FIXTURES_HOSTNAME = '127.0.0.1'
DEFAULT_SERVER_FIXTURES_SESSION_ID = get_random_id(SESSION_ID_LEN)
DEFAULT_SERVER_FIXTURES_DISABLE_HTTP_PROXY = True
DEFAULT_SERVER_FIXTURES_SERVER_CLASS = 'thread'
Expand Down