Skip to content

outofculture/django_alfajor

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

= First, install alfajor and read the docs for it. = 

= In the project root, create a separate folder for alfajor tests =

jeff@snazz:~/projects/testproject$ mkdir functional

* then add this to functional/__init__.py :

from alfajor import WebBrowser
browser = WebBrowser()
browser.configure_in_scope('self-tests')

= django-nose =

Install django-nose. You'll need to change one line to make it work (until a patch is accepted):

--- a/django_nose/runner.py
+++ b/django_nose/runner.py
@@ -85,7 +85,7 @@ def _get_options():
     cfg_files = nose.core.all_config_files()
     manager = nose.core.DefaultPluginManager()
     config = nose.core.Config(env=os.environ, files=cfg_files, plugins=manager)
-    options = config.getParser().option_list
+    options = config.getParser()._get_all_options()
     django_opts = [opt.dest for opt in BaseCommand.option_list] + ['version']
     return tuple(o for o in options if o.dest not in django_opts and
                                        o.action != 'help')

= functional/alfajor.ini =

# Create an alfajor.ini, using the alfajor/tests/browser/alfajor.ini as 
# a template, then change the cmd line as seen below:

[self-tests+browser.selenium]
cmd = python manage.py testserver --addrport=8001
server_url = http://localhost:8001
ping-address = localhost:8001

= Running =

# start the selenium server
java -jar selenium-server.jar

# run the tests
./python manage.py test functional -- --browser=firefox

= Errata =

* Known bug: running functional tests also runs other tests
* It'd be nice to automatically start up selenium.

About

Django support for Alfajor

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%