Skip to content

Commit

Permalink
Merge pull request #10 from modocache/feature/functional-tests
Browse files Browse the repository at this point in the history
Add functional tests with Selenium.
  • Loading branch information
modocache committed Aug 12, 2012
2 parents 05373f0 + f9d2bdb commit 3bf8d00
Show file tree
Hide file tree
Showing 50 changed files with 444 additions and 30 deletions.
7 changes: 6 additions & 1 deletion .travis.yml
@@ -1,5 +1,10 @@
language: python
python:
- "2.7"
before_install:
- "wget http://selenium.googlecode.com/files/selenium-server-standalone-2.25.0.jar"
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "java -jar selenium-server-standalone-2.25.0.jar -firefoxProfileTemplate 'test_project/test_app/tests/functional_tests/jc15bh8e.Selenium' &"
install: "pip install -r requirements.txt --use-mirrors"
script: python setup.py install --force && cd test_project && python manage.py test
script: python setup.py install --force && cd test_project && python test_app/tests/runtests.py
19 changes: 14 additions & 5 deletions README.md
Expand Up @@ -58,15 +58,24 @@ issues when rendering templates.
## Development

`django-generate-scaffold` is currently in ALPHA.
Everything works, but tests are not available at this time.

## Issues
### Running Tests

If you experience any issues, please
[create an issue on Github](https://github.com/modocache/django-generate-scaffold/issues).
In order to run the test suite, start a Selenium server and issue the following commands:

cd django-generate-scaffold/test_project
python test_app/tests/runtests.py

Consult `.travis.yml` for the exact steps necessary to run the test
suite.

## How to Contribute
### How to Contribute

- Propose new features or report bugs by creating an issue on Github.
- Add new features, tests, or fix stuff and issue a pull request.
- Create a better, more eloquent screencast with less stammering.

## Issues

If you experience any issues, please
[create an issue on Github](https://github.com/modocache/django-generate-scaffold/issues).
3 changes: 3 additions & 0 deletions requirements.txt
@@ -1,5 +1,8 @@
CherryPy==3.2.2
Django==1.4.1
distribute==0.6.24
django-nose==1.1
django-nose-selenium==0.7.3
nose==1.1.2
selenium==2.25.0
wsgiref==0.1.2
7 changes: 7 additions & 0 deletions test_project/test_app/templates/404.html
@@ -0,0 +1,7 @@
<html>
<body>
<h1>404 Page Not Found</h1>
<p>Oops!</p>
</body>
</html>

6 changes: 6 additions & 0 deletions test_project/test_app/templates/500.html
@@ -0,0 +1,6 @@
<html>
<body>
<h1>500 Internal Server Error</h1>
<p>Oops!</p>
</body>
</html>
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1 @@
{"title":"","id":1,"dateAdded":1344738511756405,"lastModified":1344738511756405,"type":"text/x-moz-place-container","root":"placesRoot","children":[{"title":"Bookmarks Menu","id":2,"parent":1,"dateAdded":1344738511756405,"lastModified":1344738511964730,"type":"text/x-moz-place-container","root":"bookmarksMenuFolder","children":[{"title":"Recently Bookmarked","id":13,"parent":2,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"RecentlyBookmarked"}],"type":"text/x-moz-place","uri":"place:folder=BOOKMARKS_MENU&folder=UNFILED_BOOKMARKS&folder=TOOLBAR&sort=12&excludeQueries=1&excludeItemIfParentHasAnnotation=livemark%2FfeedURI&maxResults=10&queryType=1"},{"index":1,"title":"Recent Tags","id":14,"parent":2,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"RecentTags"}],"type":"text/x-moz-place","uri":"place:sort=14&type=6&maxResults=10&queryType=1"},{"index":2,"title":"","id":15,"parent":2,"dateAdded":1344738511964730,"lastModified":1344738511964730,"type":"text/x-moz-place-separator"},{"index":3,"title":"Mozilla Firefox","id":7,"parent":2,"dateAdded":1344738511945132,"lastModified":1344738511949624,"type":"text/x-moz-place-container","children":[{"title":"Help and Tutorials","id":8,"parent":7,"dateAdded":1344738511945756,"lastModified":1344738511946576,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/help/"},{"index":1,"title":"Customize Firefox","id":9,"parent":7,"dateAdded":1344738511947238,"lastModified":1344738511947897,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/customize/"},{"index":2,"title":"Get Involved","id":10,"parent":7,"dateAdded":1344738511948466,"lastModified":1344738511949076,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/community/"},{"index":3,"title":"About Us","id":11,"parent":7,"dateAdded":1344738511949624,"lastModified":1344738511950227,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/about/"}]}]},{"index":1,"title":"Bookmarks Toolbar","id":3,"parent":1,"dateAdded":1344738511756405,"lastModified":1344738511962633,"annos":[{"name":"bookmarkProperties/description","flags":0,"expires":4,"mimeType":null,"type":3,"value":"Add bookmarks to this folder to see them displayed on the Bookmarks Toolbar"}],"type":"text/x-moz-place-container","root":"toolbarFolder","children":[{"title":"Most Visited","id":12,"parent":3,"annos":[{"name":"Places/SmartBookmark","flags":0,"expires":4,"mimeType":null,"type":3,"value":"MostVisited"}],"type":"text/x-moz-place","uri":"place:sort=8&redirectsMode=2&maxResults=10"},{"index":1,"title":"Getting Started","id":6,"parent":3,"dateAdded":1344738511944426,"lastModified":1344738511944975,"type":"text/x-moz-place","uri":"http://www.mozilla.com/en-US/firefox/central/"}]},{"index":2,"title":"Tags","id":4,"parent":1,"dateAdded":1344738511756405,"lastModified":1344738511756405,"type":"text/x-moz-place-container","root":"tagsFolder","children":[]},{"index":3,"title":"Unsorted Bookmarks","id":5,"parent":1,"dateAdded":1344738511756405,"lastModified":1344738511942426,"type":"text/x-moz-place-container","root":"unfiledBookmarksFolder","children":[]}]}
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,7 @@
[Compatibility]
LastVersion=12.0_20120420145725/20120420145725
LastOSABI=Darwin_x86_64-gcc3
LastPlatformDir=/Applications/Firefox.app/Contents/MacOS
LastAppDir=/Applications/Firefox.app/Contents/MacOS

InvalidateCaches=1
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,4 @@
[ExtensionDirs]

[ThemeDirs]
Extension0=/Applications/Firefox.app/Contents/MacOS/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,21 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-box"
sidebarcommand=""
width=""
src="" />
<RDF:Description RDF:about="chrome://browser/content/browser.xul">
<NC:persist RDF:resource="chrome://browser/content/browser.xul#main-window"/>
<NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-box"/>
<NC:persist RDF:resource="chrome://browser/content/browser.xul#sidebar-title"/>
</RDF:Description>
<RDF:Description RDF:about="chrome://browser/content/browser.xul#main-window"
width="940"
height="1018"
screenX="4"
screenY="22"
sizemode="normal" />
<RDF:Description RDF:about="chrome://browser/content/browser.xul#sidebar-title"
value="" />
</RDF:RDF>
@@ -0,0 +1,63 @@
<?xml version="1.0"?>
<RDF:RDF xmlns:NC="http://home.netscape.com/NC-rdf#"
xmlns:RDF="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<RDF:Description RDF:about="urn:handler:web:https://www.mibbit.com/?url=%s"
NC:prettyName="Mibbit"
NC:uriTemplate="https://www.mibbit.com/?url=%s" />
<RDF:Description RDF:about="urn:root"
NC:en-US_defaultHandlersVersion="3" />
<RDF:Description RDF:about="urn:handler:web:http://30boxes.com/external/widget?refer=ff&amp;url=%s"
NC:prettyName="30 Boxes"
NC:uriTemplate="http://30boxes.com/external/widget?refer=ff&amp;url=%s" />
<RDF:Description RDF:about="urn:scheme:ircs"
NC:value="ircs">
<NC:handlerProp RDF:resource="urn:scheme:handler:ircs"/>
</RDF:Description>
<RDF:Seq RDF:about="urn:schemes:root">
<RDF:li RDF:resource="urn:scheme:irc"/>
<RDF:li RDF:resource="urn:scheme:mailto"/>
<RDF:li RDF:resource="urn:scheme:ircs"/>
<RDF:li RDF:resource="urn:scheme:webcal"/>
</RDF:Seq>
<RDF:Description RDF:about="urn:scheme:webcal"
NC:value="webcal">
<NC:handlerProp RDF:resource="urn:scheme:handler:webcal"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:mailto"
NC:value="mailto">
<NC:handlerProp RDF:resource="urn:scheme:handler:mailto"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:handler:mailto"
NC:useSystemDefault="true"
NC:alwaysAsk="false">
<NC:possibleApplication RDF:resource="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"/>
<NC:possibleApplication RDF:resource="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:handler:webcal"
NC:useSystemDefault="true"
NC:alwaysAsk="true">
<NC:possibleApplication RDF:resource="urn:handler:web:http://30boxes.com/external/widget?refer=ff&amp;url=%s"/>
</RDF:Description>
<RDF:Description RDF:about="urn:scheme:irc"
NC:value="irc">
<NC:handlerProp RDF:resource="urn:scheme:handler:irc"/>
</RDF:Description>
<RDF:Description RDF:about="urn:handler:web:https://mail.google.com/mail/?extsrc=mailto&amp;url=%s"
NC:prettyName="Gmail"
NC:uriTemplate="https://mail.google.com/mail/?extsrc=mailto&amp;url=%s" />
<RDF:Description RDF:about="urn:scheme:handler:irc"
NC:useSystemDefault="true"
NC:alwaysAsk="true">
<NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
</RDF:Description>
<RDF:Description RDF:about="urn:schemes">
<NC:Protocol-Schemes RDF:resource="urn:schemes:root"/>
</RDF:Description>
<RDF:Description RDF:about="urn:handler:web:http://compose.mail.yahoo.com/?To=%s"
NC:prettyName="Yahoo! Mail"
NC:uriTemplate="http://compose.mail.yahoo.com/?To=%s" />
<RDF:Description RDF:about="urn:scheme:handler:ircs"
NC:alwaysAsk="true">
<NC:possibleApplication RDF:resource="urn:handler:web:https://www.mibbit.com/?url=%s"/>
</RDF:Description>
</RDF:RDF>
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,161 @@
Generated File. Do not edit.

[HEADER]
Version:0.15:$
Arch:x86_64-gcc3:$

[PLUGINS]
googletalkbrowserplugin.plugin:$
/Library/Internet Plug-Ins/googletalkbrowserplugin.plugin:$
3.4.2.8800:$
1344353341000:0:1:$
Version 3.4.2.8800:$
Google Talk NPAPI Plugin:$
1
0:application/googletalk:Google voice and video chat:googletalk:$
npgtpo3dautoplugin.plugin:$
/Library/Internet Plug-Ins/npgtpo3dautoplugin.plugin:$
0.1.44.16:$
1344349827000:0:1:$
Google Talk Plugin Video Accelerator version:0.1.44.16:$
Google Talk Plugin Video Accelerator:$
1
0:application/vnd.gtpo3d.auto:Google Talk Plugin Video Accelerator Type::$
QuickTime Plugin.plugin:$
/Library/Internet Plug-Ins/QuickTime Plugin.plugin:$
7.7.1:$
1343884638000:0:1:$
The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the <A HREF=http://www.apple.com/quicktime>QuickTime</A> Web site.:$
QuickTime Plug-in 7.7.1:$
43
0:video/mp4:MPEG-4 media:mp4:$
1:audio/x-ac3:AC3 audio:ac3:$
2:video/x-m4v:Video:m4v:$
3:application/x-sdp:SDP stream descriptor:sdp:$
4:audio/AMR:AMR audio:AMR:$
5:video/x-flv:Flash Video:flv:$
6:application/x-rtsp:RTSP stream descriptor:rtsp,rts:$
7:video/3gpp2:3GPP2 media:3g2,3gp2:$
8:audio/mpeg:MPEG audio:mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a,mp3,swa:$
9:video/x-nuv:NuppelVideo:nuv:$
10:audio/mpeg3:MP3 audio:mp3,swa:$
11:application/sdp:SDP stream descriptor:sdp:$
12:application/x-mpeg:AMC media:amc:$
13:video/x-msvideo:Video For Windows:avi,vfw,vfw,avi,gvi,divx,vp6:$
14:video/mpeg:MPEG media:mpeg,mpg,m1s,m1v,m1a,m75,m15,mp2,mpm,mpv,mpa:$
15:audio/aac:AAC audio:aac,adts:$
16:video/sd-video:SD video:sdv:$
17:audio/x-gsm:GSM audio:gsm:$
18:audio/x-caf:CAF audio:caf:$
19:audio/3gpp:3GPP media:3gp,3gpp:$
20:audio/mp3:MP3 audio:mp3,swa:$
21:video/avi:Video For Windows:avi,vfw,vfw,avi,gvi,divx,vp6:$
22:audio/mp4:MPEG-4 media:mp4:$
23:audio/x-aiff:AIFF audio:aiff,aif,aifc,cdda:$
24:video/x-mpeg:MPEG media:mpeg,mpg,m1s,m1v,m1a,m75,m15,mp2,mpm,mpv,mpa:$
25:video/3gpp:3GPP media:3gp,3gpp:$
26:audio/x-mpeg:MPEG audio:mpeg,mpg,m1s,m1a,mp2,mpm,mpa,m2a,mp3,swa:$
27:audio/x-aac:AAC audio:aac,adts:$
28:audio/3gpp2:3GPP2 media:3g2,3gp2:$
29:audio/x-wav:WAVE audio:wav,bwf:$
30:video/quicktime:QuickTime Movie:mov,qt,mqv:$
31:audio/x-mp3:MP3 audio:mp3,swa:$
32:audio/x-mpeg3:MP3 audio:mp3,swa:$
33:audio/x-m4a:AAC audio:m4a:$
34:audio/ac3:AC3 audio:ac3:$
35:audio/x-m4p:AAC audio:m4p:$
36:audio/x-tta:True Audio:tta:$
37:audio/x-m4b:AAC audio book:m4b:$
38:audio/aiff:AIFF audio:aiff,aif,aifc,cdda:$
39:video/msvideo:Video For Windows:avi,vfw,vfw,avi,gvi,divx,vp6:$
40:audio/basic:uLaw/AU audio:au,snd,ulw:$
41:audio/wav:WAVE audio:wav,bwf:$
42:audio/vnd.qcelp:QUALCOMM PureVoice audio:qcp,qcp:$
SharePointBrowserPlugin.plugin:$
/Library/Internet Plug-Ins/SharePointBrowserPlugin.plugin:$
14.2.3:$
1339830000000:0:1:$
Microsoft Office for Mac SharePoint Browser Plug-in:$
SharePoint Browser Plug-in:$
1
0:application/x-sharepoint:Microsoft Office for Mac SharePoint Browser Plug-in::$
JavaAppletPlugin.plugin:$
/System/Library/Java/Support/CoreDeploy.bundle/Contents/JavaAppletPlugin.plugin:$
14.3.0:$
1338841022000:0:1:$
Displays Java applet content, or a placeholder if Java is not installed.:$
Java Applet Plug-in:$
17
0:application/x-java-applet;version=1.1.3:Java applet::$
1:application/x-java-applet:Basic Java Applets:javaapplet:$
2:application/x-java-applet;jpi-version=1.6.0_33:Java applet::$
3:application/x-java-applet;version=1.2.2:Java applet::$
4:application/x-java-applet;version=1.5:Java applet::$
5:application/x-java-applet;version=1.3.1:Java applet::$
6:application/x-java-applet;version=1.3:Java applet::$
7:application/x-java-vm:Java applet::$
8:application/x-java-applet;version=1.1.2:Java applet::$
9:application/x-java-applet;version=1.1:Java applet::$
10:application/x-java-applet;version=1.2.1:Java applet::$
11:application/x-java-applet;version=1.6:Java applet::$
12:application/x-java-applet;version=1.4.2:Java applet::$
13:application/x-java-applet;version=1.4:Java applet::$
14:application/x-java-applet;version=1.1.1:Java applet::$
15:application/x-java-applet;version=1.2:Java applet::$
16:application/x-java-vm-npruntime:::$
Silverlight.plugin:$
/Library/Internet Plug-Ins/Silverlight.plugin:$
5.1.10411.0:$
1334127450000:0:1:$
5.1.10411.0:$
Silverlight Plug-In:$
2
0:application/x-silverlight:Microsoft Silverlight:xaml:$
1:application/x-silverlight-2:Microsoft Silverlight:xaml:$
LogMeIn.plugin:$
/Library/Internet Plug-Ins/LogMeIn.plugin:$
1.0.530:$
1294701146000:0:1:$
LogMeIn remote control components:$
LogMeIn Plugin 1.0.0.530:$
4
0:application/x-3amlabs-rafiletransfer:File Transfer::$
1:application/x-3amlabs-raversion:Version::$
2:application/x-3amlabs-raremotecontrol:Remote Control::$
3:application/x-3amlabs-raperfview:Performance Viewer::$
DivXBrowserPlugin.plugin:$
/Library/Internet Plug-Ins/DivXBrowserPlugin.plugin:$
2.0:$
1278528178000:0:1:$
DivX Web Player version 2.0.2.39:$
DivX Web Player:$
1
0:video/divx:DivX Video File:divx,div:$
iPhotoPhotocast.plugin:$
/Library/Internet Plug-Ins/iPhotoPhotocast.plugin:$
7.0:$
1249043146000:0:1:$
iPhoto6:$
iPhotoPhotocast:$
1
0:application/photo:iPhoto 700::$

[INVALID]
/Library/Internet Plug-Ins/SharePointWebKitPlugin.webplugin:$
1339830000000:$
/Library/Internet Plug-Ins/Quartz Composer.webplugin:$
1343884644000:$
/Library/Internet Plug-Ins/nsIQTScriptablePlugin.xpt:$
1343884638000:$
/Library/Internet Plug-Ins/npdivx.xpt:$
1278528180000:$
/Library/Internet Plug-Ins/npContributeMac.bundle:$
1328451988000:$
/Library/Internet Plug-Ins/LogMeInSafari64.plugin:$
1294701146000:$
/Library/Internet Plug-Ins/LogMeInSafari32.plugin:$
1294701146000:$
/Library/Internet Plug-Ins/flashplayer.xpt:$
1280414676000:$
/Users/bgesiak/Library/Internet Plug-Ins/WebEx.plugin:$
1340042501000:$
@@ -0,0 +1,35 @@
# Mozilla User Preferences

/* Do not edit this file.
*
* If you make changes to this file while the application is running,
* the changes will be overwritten when the application exits.
*
* To make a manual change to preferences, you can visit the URL about:config
* For more information, see http://www.mozilla.org/unix/customizing.html#prefs
*/

user_pref("browser.bookmarks.restore_default_bookmarks", false);
user_pref("browser.cache.disk.capacity", 1048576);
user_pref("browser.cache.disk.smart_size.first_run", false);
user_pref("browser.migration.version", 6);
user_pref("browser.places.smartBookmarksVersion", 2);
user_pref("browser.rights.3.shown", true);
user_pref("browser.startup.homepage_override.buildID", "20120420145725");
user_pref("browser.startup.homepage_override.mstone", "rv:12.0");
user_pref("extensions.blocklist.pingCountVersion", 0);
user_pref("extensions.bootstrappedAddons", "{}");
user_pref("extensions.databaseSchema", 12);
user_pref("extensions.enabledAddons", "{972ce4c6-7e08-4474-a285-3208198ce6fd}:12.0");
user_pref("extensions.installCache", "[{\"name\":\"app-system-local\",\"addons\":{\"{01A8CA0A-4C96-465b-A49B-65C46FAD54F9}\":{\"descriptor\":\"/Library/Application Support/Mozilla/Extensions/{ec8030f7-c20a-464f-9b0e-13a3a9e97384}/{01A8CA0A-4C96-465b-A49B-65C46FAD54F9}\",\"mtime\":1280413291000}}},{\"name\":\"app-global\",\"addons\":{\"{972ce4c6-7e08-4474-a285-3208198ce6fd}\":{\"descriptor\":\"/Applications/Firefox.app/Contents/MacOS/extensions/{972ce4c6-7e08-4474-a285-3208198ce6fd}\",\"mtime\":1336617457000}}}]");
user_pref("extensions.lastAppVersion", "12.0");
user_pref("extensions.lastPlatformVersion", "12.0");
user_pref("extensions.pendingOperations", false);
user_pref("extensions.shownSelectionUI", true);
user_pref("intl.charsetmenu.browser.cache", "UTF-8");
user_pref("network.cookie.prefsMigrated", true);
user_pref("places.history.expiration.transient_current_max_pages", 104858);
user_pref("privacy.sanitize.migrateFx3Prefs", true);
user_pref("urlclassifier.keyupdatetime.https://sb-ssl.google.com/safebrowsing/newkey", 1347330514);
user_pref("xpinstall.whitelist.add", "");
user_pref("xpinstall.whitelist.add.36", "");

0 comments on commit 3bf8d00

Please sign in to comment.