diff options
author | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-10 14:29:14 (GMT) |
---|---|---|
committer | Rogelio Mita <rogeliomita@activitycentral.com> | 2013-09-10 14:29:14 (GMT) |
commit | 0a9b4ecda72028c03d791b0ac55fd9fa8de95817 (patch) | |
tree | 4e05d2ff89bf43518126133f601293ccf1909f7f | |
parent | 4cb323471ff601f71ebf8cc15126017c31389d17 (diff) |
Definition for step: And poll in fixture:...
-rw-r--r-- | webapp/webapp/features/dependencies_information_for_opt_id.py | 25 | ||||
-rw-r--r-- | webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bson | bin | 0 -> 123 bytes | |||
-rw-r--r-- | webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson | bin | 0 -> 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 Binary files differnew file mode 100644 index 0000000..03a1ed4 --- /dev/null +++ b/webapp/webapp/features/fixtures/poll_with_dependency_rules/polls.bson diff --git a/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson b/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson Binary files differnew file mode 100644 index 0000000..e796607 --- /dev/null +++ b/webapp/webapp/features/fixtures/poll_with_dependency_rules/structures.bson |