Commit 39c37442d516f6c3f61a0b24ac7b77410f5c7e32

Authored by Sergio Oliveira
1 parent ed995b74

Behave initial setup

features/home_redirect.feature 0 → 100644
... ... @@ -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"
... ...
features/steps/home.py 0 → 100644
... ... @@ -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
... ... @@ -36,6 +36,7 @@ TEST_REQUIREMENTS = [
36 36 'coveralls>=0.5',
37 37 'flake8>=2.3.0',
38 38 'mock>=1.0.1',
  39 + 'behave_django>=0.2.2',
39 40 ]
40 41  
41 42  
... ...
tests/colab_settings.py
... ... @@ -53,3 +53,7 @@ LOGGING = {
53 53 }
54 54  
55 55 STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
  56 +
  57 +from colab.settings import INSTALLED_APPS
  58 +
  59 +INSTALLED_APPS += ('behave_django', )
... ...