Commit 39c37442d516f6c3f61a0b24ac7b77410f5c7e32
1 parent
ed995b74
Exists in
master
and in
31 other branches
Behave initial setup
Showing
4 changed files
with
23 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
1 | + | ||
2 | +Feature: Home redirect | ||
3 | + In order to be able to choose the home page | ||
4 | + As a developer | ||
5 | + I want to be able to set a custom redirect when the user access the home page | ||
6 | + | ||
7 | + Scenario: default configuration for home page | ||
8 | + When I access the URL "/" | ||
9 | + Then The browser URL should be "/dashboard" |
@@ -0,0 +1,9 @@ | @@ -0,0 +1,9 @@ | ||
1 | + | ||
2 | + | ||
3 | +@when(u'I access the URL "{url}"') | ||
4 | +def step_impl(context, url): | ||
5 | + context.response = context.test.client.get(url) | ||
6 | + | ||
7 | +@then(u'The browser URL should be "{url}"') | ||
8 | +def step_impl(context, url): | ||
9 | + context.test.assertRedirects(context.response, url, status_code=301) |
setup.py
tests/colab_settings.py
@@ -53,3 +53,7 @@ LOGGING = { | @@ -53,3 +53,7 @@ LOGGING = { | ||
53 | } | 53 | } |
54 | 54 | ||
55 | STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' | 55 | STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage' |
56 | + | ||
57 | +from colab.settings import INSTALLED_APPS | ||
58 | + | ||
59 | +INSTALLED_APPS += ('behave_django', ) |