Skip to content

Commit

Permalink
tests: fix test_sqlite_database_renamed for Django 1.11 (#739)
Browse files Browse the repository at this point in the history
* tests: fix test_sqlite_database_renamed for Django 1.11

Ref: https://github.com/django/django/blob/1.11.20/django/db/backends/sqlite3/creation.py#L19
Fixes #712.

* ci: Travis: test py27-dj111-sqlite-xdist
  • Loading branch information
blueyed authored May 30, 2019
1 parent ed958e6 commit 909dc81
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
6 changes: 3 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ jobs:
services:
- postgresql
- python: 3.6
env: TOXENV=py36-dj111-sqlite-coverage
- python: 2.7
env: TOXENV=py27-dj111-mysql_innodb-coverage
env: TOXENV=py36-dj111-mysql_innodb-coverage
services:
- mysql
- python: 2.7
env: TOXENV=py27-dj111-sqlite-xdist-coverage
- python: 3.6
env: TOXENV=checkqa,docs

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()
assert 'file:memorydb' in db_name
if conn_default.features.can_share_in_memory_db:
assert 'file:memorydb' in db_name
else:
assert db_name == ":memory:"
assert conn_db2.vendor == 'sqlite'
db_name = conn_db2.creation._get_test_db_name()
Expand Down
4 changes: 2 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ deps =
dj19: Django>=1.9,<1.10
dj18: Django>=1.8,<1.9

mysql_myisam: mysql-python==1.2.5
mysql_innodb: mysql-python==1.2.5
mysql_myisam: mysqlclient==1.4.2.post1
mysql_innodb: mysqlclient==1.4.2.post1

postgres: psycopg2-binary
coverage: coverage-enable-subprocess
Expand Down

0 comments on commit 909dc81

Please sign in to comment.