Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
6d051ec2
Commit
6d051ec2
authored
Mar 25, 2014
by
Michal Čihař
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify nose test settings by sharing with generic test ones
Issue #461 Signed-off-by:
Michal Čihař
<
michal@cihar.com
>
parent
951ba07e
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
70 deletions
+2
-70
weblate/settings_test_nose.py
weblate/settings_test_nose.py
+2
-70
No files found.
weblate/settings_test_nose.py
View file @
6d051ec2
...
...
@@ -28,77 +28,9 @@ are:
- It will let more precise specification of what tests to run.
"""
from
weblate.settings_
example
import
*
from
weblate.settings_
test
import
*
import
os
if
'TRAVIS_DATABASE'
in
os
.
environ
:
if
os
.
environ
[
'TRAVIS_DATABASE'
]
==
'mysql'
:
DATABASES
[
'default'
][
'ENGINE'
]
=
'django.db.backends.mysql'
DATABASES
[
'default'
][
'NAME'
]
=
'weblate'
DATABASES
[
'default'
][
'USER'
]
=
'root'
DATABASES
[
'default'
][
'PASSWORD'
]
=
''
elif
os
.
environ
[
'TRAVIS_DATABASE'
]
==
'postgresql'
:
DATABASES
[
'default'
][
'ENGINE'
]
=
\
'django.db.backends.postgresql_psycopg2'
DATABASES
[
'default'
][
'NAME'
]
=
'weblate'
DATABASES
[
'default'
][
'USER'
]
=
'postgres'
DATABASES
[
'default'
][
'PASSWORD'
]
=
''
# Configure admins
ADMINS
=
((
'Weblate test'
,
'noreply@weblate.org'
),
)
# Different root for test repos
GIT_ROOT
=
'%s/test-repos/'
%
WEB_ROOT
# Avoid migrating during testsuite
SOUTH_TESTS_MIGRATE
=
False
# Fake access to Microsoft Translator
MT_MICROSOFT_ID
=
'ID'
MT_MICROSOFT_SECRET
=
'SECRET'
# Fake Google translate API key
MT_GOOGLE_KEY
=
'KEY'
# To get higher limit for testing
MT_MYMEMORY_EMAIL
=
'test@weblate.org'
# Enable some machine translations
MACHINE_TRANSLATION_SERVICES
=
(
'weblate.trans.machine.microsoft.MicrosoftTranslation'
,
'weblate.trans.machine.dummy.DummyTranslation'
,
)
# Silent logging setup
LOGGING
=
{
'version'
:
1
,
'disable_existing_loggers'
:
False
,
'filters'
:
{
'require_debug_false'
:
{
'()'
:
'django.utils.log.RequireDebugFalse'
}
},
'handlers'
:
{
'mail_admins'
:
{
'level'
:
'ERROR'
,
'filters'
:
[
'require_debug_false'
],
'class'
:
'django.utils.log.AdminEmailHandler'
},
},
'loggers'
:
{
'django.request'
:
{
'handlers'
:
[
'mail_admins'
],
'level'
:
'ERROR'
,
'propagate'
:
True
,
},
'weblate'
:
{
'handlers'
:
[],
'level'
:
'ERROR'
,
}
}
}
INSTALLED_APPS
=
INSTALLED_APPS
+
(
'django_nose'
,
)
TEST_RUNNER
=
'django_nose.NoseTestSuiteRunner'
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment