Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRogelio Mita <rogeliomita@activitycentral.com>2013-09-10 14:29:14 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-09-10 14:29:14 (GMT)
commit0a9b4ecda72028c03d791b0ac55fd9fa8de95817 (patch)
tree4e05d2ff89bf43518126133f601293ccf1909f7f
parent4cb323471ff601f71ebf8cc15126017c31389d17 (diff)
Definition for step: And poll in fixture:...
-rw-r--r--webapp/webapp/features/dependencies_information_for_opt_id.py25
-rw-r--r--webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bsonbin0 -> 123 bytes
-rw-r--r--webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bsonbin0 -> 553 bytes
3 files changed, 25 insertions, 0 deletions
diff --git a/webapp/webapp/features/dependencies_information_for_opt_id.py b/webapp/webapp/features/dependencies_information_for_opt_id.py
new file mode 100644
index 0000000..384ac6c
--- /dev/null
+++ b/webapp/webapp/features/dependencies_information_for_opt_id.py
@@ -0,0 +1,25 @@
+# -*- coding: utf-8 -*-
+import os
+
+from lettuce import step
+from fabric.api import local
+from django.conf import settings
+
+
+@step(u'And poll in fixture: "([^"]*)"')
+def and_poll_in_fixture_fixture_name(step, fixture_name):
+ location = lambda x: os.path.join(
+ os.path.dirname(os.path.realpath(__file__)),
+ "fixtures",
+ fixture_name,
+ x
+ )
+ db_name = settings.MONGO_SETTINGS['NAME']
+ polls_fixture = location("polls.bson")
+ local(
+ "mongorestore --collection polls --db %s "
+ "%s" % (db_name, polls_fixture))
+ structures_fixture = location("structures.bson")
+ local(
+ "mongorestore --collection structures --db %s "
+ "%s" % (db_name, structures_fixture))
diff --git a/webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bson b/webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bson
new file mode 100644
index 0000000..03a1ed4
--- /dev/null
+++ b/webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bson
Binary files differ
diff --git a/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson b/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson
new file mode 100644
index 0000000..e796607
--- /dev/null
+++ b/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson
Binary files differ