Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lettuce
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
lettuce
Commits
3464d3b5
Commit
3464d3b5
authored
Jun 18, 2013
by
Gabriel Falcão
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #346 from infoxchange/use-custom-test-runner
Use a custom TEST_RUNNER
parents
cc32497d
653b066c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
26 additions
and
4 deletions
+26
-4
lettuce/django/management/commands/harvest.py
+2
-2
tests/integration/django/alfaces/settings.py
+2
-2
tests/integration/django/brocolis/leaves/test_runner.py
+6
-0
tests/integration/django/brocolis/settings.py
+2
-0
tests/integration/test_brocolis.py
+14
-0
No files found.
lettuce/django/management/commands/harvest.py
View file @
3464d3b5
...
...
@@ -123,8 +123,8 @@ class Command(BaseCommand):
migrate_south
=
False
pass
from
django.test.
simple
import
DjangoTestSuiteR
unner
self
.
_testrunner
=
DjangoTestSuiteRunner
(
)
from
django.test.
utils
import
get_r
unner
self
.
_testrunner
=
get_runner
(
settings
)(
interactive
=
False
)
self
.
_testrunner
.
setup_test_environment
()
self
.
_old_db_config
=
self
.
_testrunner
.
setup_databases
()
...
...
tests/integration/django/alfaces/settings.py
View file @
3464d3b5
...
...
@@ -15,4 +15,5 @@ INSTALLED_APPS = (
'lettuce.django'
,
'donothing'
,
'foobar'
,
)
\ No newline at end of file
)
SECRET_KEY
=
'secret'
tests/integration/django/brocolis/leaves/test_runner.py
0 → 100644
View file @
3464d3b5
from
django.test.simple
import
DjangoTestSuiteRunner
class
TestRunner
(
DjangoTestSuiteRunner
):
def
setup_test_environment
(
self
,
**
kwargs
):
super
(
TestRunner
,
self
)
.
setup_test_environment
(
**
kwargs
)
print
"Custom test runner enabled."
tests/integration/django/brocolis/settings.py
View file @
3464d3b5
...
...
@@ -15,3 +15,5 @@ INSTALLED_APPS = (
'lettuce.django'
,
'leaves'
,
)
TEST_RUNNER
=
'leaves.test_runner.TestRunner'
SECRET_KEY
=
'secret'
tests/integration/test_brocolis.py
View file @
3464d3b5
...
...
@@ -58,3 +58,17 @@ def test_harvest_sets_environment_variabled_for_gae():
assert_equals
(
status
,
0
,
out
)
FileSystem
.
popd
()
def
test_harvest_uses_test_runner
():
'harvest uses TEST_RUNNER specified in settings'
FileSystem
.
pushd
(
current_directory
,
"django"
,
"brocolis"
)
status
,
out
=
commands
.
getstatusoutput
(
"python manage.py harvest -T leaves/features/disabled.feature"
)
assert_equals
(
status
,
0
,
out
)
assert
"Custom test runner enabled."
in
out
FileSystem
.
popd
()
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