Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCode Raguet <ignacio.code@gmail.com>2013-08-26 19:10:44 (GMT)
committer Code Raguet <ignacio.code@gmail.com>2013-08-27 18:03:31 (GMT)
commitfed4e6805d1a65e69afc48ca572ae65d2c4e879e (patch)
tree695fce319c37ca9e22b5673c66b1ec116ccedfd6
parent4d6f12c612987c43548a0acc98669cd0f4170329 (diff)
move lettuce hook to terrain file
-rw-r--r--webapp/webapp/features/index.py13
-rw-r--r--webapp/webapp/features/terrain.py12
2 files changed, 13 insertions, 12 deletions
diff --git a/webapp/webapp/features/index.py b/webapp/webapp/features/index.py
index e273bd9..b7e2a72 100644
--- a/webapp/webapp/features/index.py
+++ b/webapp/webapp/features/index.py
@@ -1,14 +1,8 @@
-from lettuce import *
-from splinter import Browser
+from lettuce import step, world
from nose.tools import assert_equals
from lettuce.django import django_url
-@before.all
-def set_browser():
- world.browser = Browser('phantomjs')
-
-
@step(r'I access the url "(.*)"')
def access_url(step, url):
url = django_url(url)
@@ -18,8 +12,3 @@ def access_url(step, url):
@step(r'I should see "(.*)" as title')
def then_i_should_see_the_title_group1(step, title):
assert_equals(world.browser.title, title)
-
-
-@after.all
-def exit_browser(total):
- world.browser.quit()
diff --git a/webapp/webapp/features/terrain.py b/webapp/webapp/features/terrain.py
new file mode 100644
index 0000000..6424636
--- /dev/null
+++ b/webapp/webapp/features/terrain.py
@@ -0,0 +1,12 @@
+from lettuce import world, before, after
+from splinter import Browser
+
+
+@before.all
+def set_browser():
+ world.browser = Browser('phantomjs')
+
+
+@after.all
+def exit_browser(total):
+ world.browser.quit()