Download Shareware and Freeware Software for Windows, Linux, Macintosh, PDA

line Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Serving Software Downloads in 976 Categories, Downloaded 30.066.254 Times

django-webtest 1.4.4

Company: Mikhail Korobov
Date Added: October 10, 2013  |  Visits: 381

django-webtest

Report Broken Link
Printer Friendly Version


Product Homepage
Download (18 downloads)

django-webtest is an almost trivial application for instant integration of Ian Bicking's WebTest (http://pythonpaste.org/webtest/) with django's testing framework.<br /><br />Installation<br /><br />pip install webtest<br />pip install django-webtest<br /><br />or<br /><br />easy_install webtest<br />easy_install django-webtest<br /><br />or grab latest versions from bitbucket (http://bitbucket.org/ianb/webtest, http://bitbucket.org/kmike/django-webtest)<br /><br />Usage<br /><br />django-webtest provides django.test.TestCase subclass (WebTest) that creates webtest.TestApp around django wsgi interface and make it available in tests as self.app.<br /><br />It also features optional user argument for self.app.get and self.app.post methods to help making authorized requests. This argument should be django.contrib.auth.models.User's username for user who is supposed to be logged in.<br /><br />All of these features can be easily set up manually (thanks to WebTest architecture) and they are even not neccessary for using WebTest with django but it is nice to have some sort of integration instantly.<br /><br />from django_webtest import WebTest<br /><br />class MyTestCase(WebTest):<br /><br /> # we want some initial data to be able to login<br /> fixtures = ['users', 'blog_posts']<br /><br /> def testBlog(self):<br /> # pretend to be logged in as user `kmike` and go to the index page<br /> index = self.app.get('/', user='kmike')<br /><br /> # All the webtest API is available. For example, we click<br /> # on a Blog link, check that it<br /> # works (result page doesn't raise exceptions and returns 200 http<br /> # code) and test if result page have 'My Article' text in<br /> # it's body.<br /> assert 'My Article' in index.click('Blog')<br /><br />See http://pythonpaste.org/webtest/ for API help. It can follow links, submit forms, parse html, xml and json responses with different parsing libraries, upload files and more.<br /><br />Why?<br /><br />While django.test.client.Client is fine for it's purposes, it is not well-suited for functional or integration testing. From django's test client docstring:<br /><br /> This is not intended as a replacement for Twill/Selenium or the like - it is here to allow testing against the contexts and templates produced by a view, rather than the HTML rendered to the end-user.<br /><br />WebTest plays on the same field as twill. WebTest has nice API, is fast, small, talk to django application via WSGI instead of HTTP and is an easy way to write functional/integration/acceptance tests.<br /><br />Twill is also a great tool and it also can be easily integrated with django (see django-test-utils package) and I also enjoy it much. But I prefer WebTest over twill because twill is old (last release is in 2007), communicate via HTTP instead of WSGI (though there is workaround for that), lacks support for non-latin text (not to mention unicode) and have a much larger codebase to hack on. Twill however understands HTML better and is more mature so consider it (and django-test-utils package) if WebTest doesn't fit for some reason.<br /><br />#md5=f08721422f77edb35a466813437af968

Requirements: No special requirements
Platforms: *nix, Linux
Keyword: 039my Argument Article Django Djangotestutils Doesn Easily Features Index Install Integration It039s Logged Package Result Testing Twill Webtest
Users rating: 0/10

License: Freeware Size: 10.24 KB
DJANGO-WEBTEST RELATED
Network & Internet  -  django_evolution 0.6.7
When you run ./manage.py syncdb, Django will look for any new models that have been defined, and add a database table to represent those new models. However, if you make a change to an existing model, ./manage.py syncdb will not make any changes...
61.44 KB  
Application Add-Ins  -  Article Submission Pro Software 2.1
The article submission pro software is an easy to operate article submission software that easily submits your written articles to the top article directory sites on the internet. Distributing your articles to the number one article directory...
1.61 MB  
Web Authoring  -  Automated Article Submitter 2.0
Download This Article Submission Software and Easily Blast Your Articles To Multiple Directories In Just Seconds! This Cool Software delivers your article to the top article directories in less then a minute. Imagine the amount of exposure you are...
1.63 MB  
Programming  -  django-vinaigrette 0.1.1
Vinaigrette translates Django model data -- stored in the database -- using GNU gettext and Django's standard internationalization features. Installing Add 'vinaigrette' to INSTALLED_APPS in your settings. Then, tell...
10.24 KB  
Games  -  Elephantine Memory 1.0
Elephantine memory is one of basic memory games. You can play it to strength your short-term memory. The game is suitable for all ages, so everyone who wants to make brain exercise can play it easily. Features: For now, the concept is just...
12.5 MB  
Music  -  Enjoy Piano for iPad 1.2
This is a Piano app that let you play the piano easily. Features: - Key labels with colors help you recognize which key you touch, and also make it fun to see. ? - Volume control makes it possible for you to adjust the volume...
3 MB  
Entertainment  -  EpisodeTime 1.2
EpisodeTime is the app you need to follow, share and discover TV shows easily. Features : - Agenda : You will never miss an episode aired date. - Episodes to watch : find quickly the next episode you have to watch. - Browse :...
6.6 MB  
Education  -  Hinsdale Central High School 1.1.1
Hinsdale Central students and parents can finally access the information they need about Central quickly and easily. Features: School calendar - View school events, late start days, and holidays Sports calendar - Find out all...
6.5 MB  
Productivity  -  ProMan - Project Manager 1.2
A lot of planning, day-to-day works... we are tired all the time. With our app - ProMan, you can manage complex task / plan / schedule / project very easily. Features - Simple, Intuitive Interface - Various sort options -...
614.4 KB  
Lifestyle  -  Argentinian Lotto Results 7.5.2.0
Shows and updates lottery results Argentinian lotteries: Brinco Club Keno Desquite Loto Loto 5 Mono Bingo Quinella Plus Rekino Sale O Sale Super Plus Telekino Track multiple lotteries easily....
1024 KB  
NEW DOWNLOADS IN LINUX SOFTWARE, HOME & LEISURE
Linux Software  -  Polling Autodialer Software 3.4
ICTBroadcast Auto Dialer software has a survey campaign for telephone surveys and polls. This auto dialer software automatically dials a list of numbers and asks them a set of questions that they can respond to, by using their telephone keypad....
488 B  
Linux Software  -  Total Video Converter Mac Free 3.5.5
Total Video Converter Mac Free developed by EffectMatrix Ltd is the official legal version of Total Video Converter which was a globally recognized brand since 2006. Total Video Converter Mac Free is a free but powerful all-in-one video...
17.7 MB  
Linux Software  -  Skeith mod_log_sql Analyzer 2.10beta2
Skeith is a php based front end for analyzing logs for Apache using mod_log_sql.
47.5 KB  
Linux Software  -  SLAX 6.0+
Slax is a modern, portable, small and fast Linux operating system with a modular approach and outstanding design. Despite its small size, Slax provides a wide collection of pre-installed software for daily use, including a well organized graphical...
190 KB  
Linux Software  -  GTK+ 2.5
GTK+, which stands for the GIMP Toolkit, is a library for creating graphical user interfaces for the X Window System. It is designed to be small, efficient, and flexible. GTK+ is written in C with a very object-oriented approach. Language bindings...
60 MB  
Home & Leisure  -  Hadrian 0.1.7
Hadrian - A collection of plugable Django apps and utilities that I use in my projects.
143.36 KB  
Home & Leisure  -  StarDict for Fedora Linux 3.0.2
Stardict is a free open source off-line dictionary program that allows you to use all those free dictionaries(at the moment more than 100 dictionaries are available). Glob-style pattern matching You can input strings containing '*'...
1.64 MB  
Home & Leisure  -  django-popularity for Linux 0.2
django-popularity is a Django app that makes it very easy to track the amount of views for objects, and generate (generic) popularity listings based upon that. Right now it has a measure for view counts, relative view counts, novelty...
20.48 KB  
Home & Leisure  -  django-easy-maps 0.7.2
This app makes it easy to display a map for given address in django templates. No API keys, manual geocoding, html/js copy-pasting or django model changes is needed. Installation pip install geopy pip install...
10.24 KB  
Home & Leisure  -  The Huffington Post 0.7.9
The Huffington Post is a Google Chrome extension that will get up to-the-minute reports, blogs and analysis with quick-view articles from all sections of the Huffington Post. You can share to your social networks, comment, and more!
10.24 KB