Skip to content

Commit

Permalink
tests: follow-up fix for test_sqlite_database_renamed (#741)
Browse files Browse the repository at this point in the history
  • Loading branch information
blueyed authored May 30, 2019
1 parent ec9741d commit 7553d4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
python: 3.7
env: TOXENV=py37-dj21-sqlite-coverage
- python: 3.7
env: TOXENV=py37-dj22-sqlite-coverage
env: TOXENV=py37-dj22-sqlite-xdist-coverage

# Explicitly test (older) pytest 4.1.
- python: 3.7
Expand Down
5 changes: 4 additions & 1 deletion tests/test_db_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,7 +278,10 @@ def test_a():
assert conn_default.vendor == 'sqlite'
db_name = conn_default.creation._get_test_db_name()
if conn_default.features.can_share_in_memory_db:
# can_share_in_memory_db was removed in Django 2.1, and
# used in _get_test_db_name before.
if getattr(conn_default.features, "can_share_in_memory_db", True):
assert 'file:memorydb' in db_name
else:
assert db_name == ":memory:"
Expand Down

0 comments on commit 7553d4b

Please sign in to comment.