Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 9339b15

Browse filesBrowse files
authored
travis: run django-1.11.18 tests (PyMySQL#328)
1 parent 1f6e18d commit 9339b15
Copy full SHA for 9339b15

File tree

Expand file treeCollapse file tree

2 files changed

+70
-0
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+70
-0
lines changed

‎.travis.yml

Copy file name to clipboardExpand all lines: .travis.yml
+25Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,4 +36,29 @@ script:
3636
after_succes:
3737
- codecov
3838

39+
matrix:
40+
include:
41+
- &django_py27
42+
python: "2.7"
43+
install:
44+
- pip install -U pip
45+
- wget https://github.com/django/django/archive/1.11.18.tar.gz
46+
- tar xf 1.11.18.tar.gz
47+
- pip install django-1.11.18/
48+
- cp ci/test_mysql.py django-1.11.18/tests/
49+
- pip install .
50+
51+
before_script:
52+
- mysql -e 'create user django identified by "secret"'
53+
- mysql -e 'grant all on *.* to django'
54+
- mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql
55+
56+
script:
57+
- cd django-1.11.18/tests/
58+
- ./runtests.py --parallel=1 --settings=test_mysql
59+
60+
- &django_py3
61+
<<: *django_py27
62+
python: "3.7"
63+
3964
# vim: sw=2 ts=2 sts=2

‎ci/test_mysql.py

Copy file name to clipboard
+45Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
# This is an example test settings file for use with the Django test suite.
2+
#
3+
# The 'sqlite3' backend requires only the ENGINE setting (an in-
4+
# memory database will be used). All other backends will require a
5+
# NAME and potentially authentication information. See the
6+
# following section in the docs for more information:
7+
#
8+
# https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/
9+
#
10+
# The different databases that Django supports behave differently in certain
11+
# situations, so it is recommended to run the test suite against as many
12+
# database backends as possible. You may want to create a separate settings
13+
# file for each of the backends you test against.
14+
15+
DATABASES = {
16+
'default': {
17+
'ENGINE': 'django.db.backends.mysql',
18+
'NAME': 'django_default',
19+
'USER': 'django',
20+
'HOST': '127.0.0.1',
21+
'PASSWORD': 'secret',
22+
'TEST': {
23+
'CHARSET': 'utf8mb4',
24+
'COLLATION': 'utf8mb4_general_ci',
25+
},
26+
},
27+
'other': {
28+
'ENGINE': 'django.db.backends.mysql',
29+
'NAME': 'django_other',
30+
'USER': 'django',
31+
'HOST': '127.0.0.1',
32+
'PASSWORD': 'secret',
33+
'TEST': {
34+
'CHARSET': 'utf8mb4',
35+
'COLLATION': 'utf8mb4_general_ci',
36+
},
37+
}
38+
}
39+
40+
SECRET_KEY = "django_tests_secret_key"
41+
42+
# Use a fast hasher to speed up tests.
43+
PASSWORD_HASHERS = [
44+
'django.contrib.auth.hashers.MD5PasswordHasher',
45+
]

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.