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
31b0dfd8
Commit
31b0dfd8
authored
Aug 16, 2017
by
Jeremy Bowman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add LETTUCE_HOST env var
parent
6d68a72e
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
10 additions
and
18 deletions
+10
-18
README.md
+1
-1
lettuce/__init__.py
+1
-1
lettuce/django/apps.py
+2
-11
lettuce/django/server.py
+1
-0
setup.py
+1
-1
tests/functional/test_runner.py
+3
-3
tests/unit/test_main.py
+1
-1
No files found.
README.md
View file @
31b0dfd8
# lettuce
# lettuce
> Version 0.2.23 - kryptonite
> Version 0.2.23
+edx.1
- kryptonite
[

](http://travis-ci.org/gabrielfalcao/lettuce)
[

](http://travis-ci.org/gabrielfalcao/lettuce)
...
...
lettuce/__init__.py
View file @
31b0dfd8
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
__version__
=
version
=
'0.2.23'
__version__
=
version
=
'0.2.23
+edx.1
'
release
=
'kryptonite'
release
=
'kryptonite'
...
...
lettuce/django/apps.py
View file @
31b0dfd8
...
@@ -16,10 +16,7 @@
...
@@ -16,10 +16,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from
os.path
import
join
,
dirname
from
os.path
import
join
,
dirname
try
:
from
django.apps
import
apps
as
django_apps
from
importlib
import
import_module
except
ImportError
:
from
django.utils.importlib
import
import_module
from
django.conf
import
settings
from
django.conf
import
settings
...
@@ -57,13 +54,7 @@ def get_apps():
...
@@ -57,13 +54,7 @@ def get_apps():
Import Django apps. It ignores ImportErrors.
Import Django apps. It ignores ImportErrors.
(Django will take care of it)
(Django will take care of it)
"""
"""
apps
=
[]
return
[
app_cfg
.
module
for
app_cfg
in
django_apps
.
get_app_configs
()]
for
app
in
settings
.
INSTALLED_APPS
:
try
:
apps
.
append
(
import_module
(
app
))
except
ImportError
:
pass
return
apps
def
harvest_lettuces
(
only_the_apps
=
None
,
avoid_apps
=
None
,
path
=
"features"
):
def
harvest_lettuces
(
only_the_apps
=
None
,
avoid_apps
=
None
,
path
=
"features"
):
...
...
lettuce/django/server.py
View file @
31b0dfd8
...
@@ -133,6 +133,7 @@ class ThreadedServer(multiprocessing.Process):
...
@@ -133,6 +133,7 @@ class ThreadedServer(multiprocessing.Process):
@staticmethod
@staticmethod
def
get_real_address
(
address
):
def
get_real_address
(
address
):
address
=
os
.
environ
.
get
(
'LETTUCE_HOST'
,
address
)
if
address
==
'0.0.0.0'
or
address
==
'localhost'
:
if
address
==
'0.0.0.0'
or
address
==
'localhost'
:
address
=
'127.0.0.1'
address
=
'127.0.0.1'
...
...
setup.py
View file @
31b0dfd8
...
@@ -36,7 +36,7 @@ if os.name.lower() == 'nt':
...
@@ -36,7 +36,7 @@ if os.name.lower() == 'nt':
setup
(
setup
(
name
=
'lettuce'
,
name
=
'lettuce'
,
version
=
'0.2.23'
,
version
=
'0.2.23
+edx.1
'
,
description
=
'Behaviour Driven Development for python'
,
description
=
'Behaviour Driven Development for python'
,
author
=
'Gabriel Falcao'
,
author
=
'Gabriel Falcao'
,
author_email
=
'gabriel@nacaolivre.org'
,
author_email
=
'gabriel@nacaolivre.org'
,
...
...
tests/functional/test_runner.py
View file @
31b0dfd8
...
@@ -1276,7 +1276,7 @@ def test_output_background_with_success_colorless():
...
@@ -1276,7 +1276,7 @@ def test_output_background_with_success_colorless():
' Given the variable "X" holds 2 # tests/functional/test_runner.py:{line}
\n
'
' Given the variable "X" holds 2 # tests/functional/test_runner.py:{line}
\n
'
'
\n
'
'
\n
'
' Scenario: multiplication changing the value # tests/functional/bg_features/simple/simple.feature:9
\n
'
' Scenario: multiplication changing the value # tests/functional/bg_features/simple/simple.feature:9
\n
'
' Given the variable "X" is equal to 2 # tests/functional/
test_runner.py:{line}
\n
'
' Given the variable "X" is equal to 2 # tests/functional/
bg_features/simple/steps.py:5
\n
'
'
\n
'
'
\n
'
'1 feature (1 passed)
\n
'
'1 feature (1 passed)
\n
'
'1 scenario (1 passed)
\n
'
'1 scenario (1 passed)
\n
'
...
@@ -1314,8 +1314,8 @@ def test_output_background_with_success_colorful():
...
@@ -1314,8 +1314,8 @@ def test_output_background_with_success_colorful():
'
\033
[A
\033
[1;32m Given the variable "X" holds 2
\033
[1;30m# tests/functional/test_runner.py:{line}
\033
[0m
\n
'
'
\033
[A
\033
[1;32m Given the variable "X" holds 2
\033
[1;30m# tests/functional/test_runner.py:{line}
\033
[0m
\n
'
'
\n
'
'
\n
'
'
\033
[1;37m Scenario: multiplication changing the value
\033
[1;30m# tests/functional/bg_features/simple/simple.feature:9
\033
[0m
\n
'
'
\033
[1;37m Scenario: multiplication changing the value
\033
[1;30m# tests/functional/bg_features/simple/simple.feature:9
\033
[0m
\n
'
'
\033
[1;30m Given the variable "X" is equal to 2
\033
[1;30m# tests/functional/
test_runner.py:{line}
\033
[0m
\n
'
'
\033
[1;30m Given the variable "X" is equal to 2
\033
[1;30m# tests/functional/
bg_features/simple/steps.py:5
\033
[0m
\n
'
'
\033
[A
\033
[1;32m Given the variable "X" is equal to 2
\033
[1;30m# tests/functional/
test_runner.py:{line}
\033
[0m
\n
'
'
\033
[A
\033
[1;32m Given the variable "X" is equal to 2
\033
[1;30m# tests/functional/
bg_features/simple/steps.py:5
\033
[0m
\n
'
'
\n
'
'
\n
'
'
\033
[1;37m1 feature (
\033
[1;32m1 passed
\033
[1;37m)
\033
[0m
\n
'
'
\033
[1;37m1 feature (
\033
[1;32m1 passed
\033
[1;37m)
\033
[0m
\n
'
'
\033
[1;37m1 scenario (
\033
[1;32m1 passed
\033
[1;37m)
\033
[0m
\n
'
'
\033
[1;37m1 scenario (
\033
[1;32m1 passed
\033
[1;37m)
\033
[0m
\n
'
...
...
tests/unit/test_main.py
View file @
31b0dfd8
...
@@ -23,7 +23,7 @@ from mox import Mox
...
@@ -23,7 +23,7 @@ from mox import Mox
def
test_has_version
():
def
test_has_version
():
"A nice python module is supposed to have a version"
"A nice python module is supposed to have a version"
assert_equals
(
lettuce
.
version
,
'0.2.23'
)
assert_equals
(
lettuce
.
version
,
'0.2.23
+edx.1
'
)
def
test_has_release
():
def
test_has_release
():
...
...
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