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-08-23 19:53:52 (GMT)
committer Rogelio Mita <rogeliomita@activitycentral.com>2013-08-23 19:53:52 (GMT)
commitb4f1b80e2cd9ee7f8158748acf46f42ed1f1c6f0 (patch)
tree82c6524f51d64c1a57d72daa0a051992b964bdd9
parent76ef1f8481372beaba510ebd6476c89ccb2caf87 (diff)
parent47f16323d298c7e41bd27f3bddc7b79879317959 (diff)
Merge branch 'DEV'v4.14
-rw-r--r--.gitignore1
-rw-r--r--CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.xo (renamed from CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.tar.gz)bin286104 -> 286104 bytes
-rw-r--r--webapp/requirements13
-rw-r--r--webapp/webapp/features/index.feature5
-rw-r--r--webapp/webapp/features/index.py25
-rw-r--r--webapp/webapp/settings.py7
-rw-r--r--webapp/webapp/test_settings.py2
-rw-r--r--webapp/webapp/urls.py5
8 files changed, 46 insertions, 12 deletions
diff --git a/.gitignore b/.gitignore
index 1353354..68dcc8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ CeibalEncuesta/gtk2/scripts/*.run
CeibalEncuesta/gtk3/scripts/*.tar.gz
CeibalEncuesta/gtk3/scripts/*.run
webapp/stress_test/poll_results
+webapp/ghostdriver.log
diff --git a/CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.tar.gz b/CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.xo
index 8d43953..7d426f1 100644
--- a/CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.tar.gz
+++ b/CeibalEncuesta/gtk2/installers/CeibalEncuesta-4.14.xo
Binary files differ
diff --git a/webapp/requirements b/webapp/requirements
index 039c8bd..97792dd 100644
--- a/webapp/requirements
+++ b/webapp/requirements
@@ -1,10 +1,13 @@
+PIL==1.1.7
+django-jasmine==0.3.2
+django-nose==1.1
django==1.4.4
+fabric==1.5.3
+lettuce==0.2.18
+nose==1.2.1
pep8==1.4.2
pyflakes==0.6.1
-nose==1.2.1
-django-nose==1.1
-fabric==1.5.3
pymongo==2.4.2
-django-jasmine==0.3.2
+selenium==2.34.0
sorl-thumbnail==11.12
-PIL==1.1.7 \ No newline at end of file
+splinter==0.5.4
diff --git a/webapp/webapp/features/index.feature b/webapp/webapp/features/index.feature
new file mode 100644
index 0000000..9aee07b
--- /dev/null
+++ b/webapp/webapp/features/index.feature
@@ -0,0 +1,5 @@
+Feature: App needs title
+
+ Scenario: Home page has title
+ Given I access the url "/"
+ Then I should see "Sistema de encuestas" as title \ No newline at end of file
diff --git a/webapp/webapp/features/index.py b/webapp/webapp/features/index.py
new file mode 100644
index 0000000..e273bd9
--- /dev/null
+++ b/webapp/webapp/features/index.py
@@ -0,0 +1,25 @@
+from lettuce import *
+from splinter import Browser
+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)
+ world.browser.visit(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/settings.py b/webapp/webapp/settings.py
index afdde63..40584b3 100644
--- a/webapp/webapp/settings.py
+++ b/webapp/webapp/settings.py
@@ -60,7 +60,7 @@ MEDIA_URL = '/media/'
# Don't put anything in this directory yourself; store your static files
# in apps' "static/" subdirectories and in STATICFILES_DIRS.
# Example: "/home/media/media.lawrence.com/static/"
-STATIC_ROOT = PROJECT_ROOT + "/static/"
+STATIC_ROOT = ""
# URL prefix for static files.
@@ -72,6 +72,7 @@ STATICFILES_DIRS = (
# Put strings here, like "/home/html/static" or "C:/www/django/static".
# Always use forward slashes, even on Windows.
# Don't forget to use absolute paths, not relative paths.
+ '/home/code/activity_central/polls/webapp/webapp/static',
)
# List of finder classes that know how to find static files in
@@ -152,9 +153,11 @@ INSTALLED_APPS = (
#'django.contrib.sites',
#'django.contrib.messages',
- #'django.contrib.staticfiles',
+ 'django.contrib.staticfiles',
# Uncomment the next line to enable admin documentation:
# 'django.contrib.admindocs',
+
+ 'lettuce.django'
)
TEST_RUNNER = 'django_nose.NoseTestSuiteRunner'
diff --git a/webapp/webapp/test_settings.py b/webapp/webapp/test_settings.py
index e347568..d861ab6 100644
--- a/webapp/webapp/test_settings.py
+++ b/webapp/webapp/test_settings.py
@@ -3,6 +3,8 @@ from settings import *
from utils.mongo_connection import register_connection
+DEBUG = True
+
MONGO_SETTINGS = {
'ALIAS': 'default',
'NAME': 'test_dev_polls',
diff --git a/webapp/webapp/urls.py b/webapp/webapp/urls.py
index a7ca1d3..ebed7a0 100644
--- a/webapp/webapp/urls.py
+++ b/webapp/webapp/urls.py
@@ -23,11 +23,6 @@ if settings.DEBUG:
urlpatterns += patterns('django.views.static',
(
- r'^%s(?P<path>.*)$' % settings.STATIC_URL[1:],
- 'serve',
- {"document_root": settings.STATIC_ROOT, "show_indexes": True}
- ),
- (
r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
'serve',
{"document_root": settings.MEDIA_ROOT, "show_indexes": True}