A unit testing tool for Python's bottle library.
Project description
Boddle
A unit testing tool for Python’s bottle library. We wrote this for our own testing purposes at https://www.hvst.com. Thanks brenguyen711 for the great name!
Install
sudo pip install boddle
Usage
Assuming you have a bottle route like this:
@bottle.get('/woot')
def woot():
return bottle.request.params['name']
You can unit test it like:
import unittest
from boddle import boddle
class TestIt(unittest.TestCase):
def testWoot(self):
with boddle(params={'name':'derek'}):
self.assertEqual(woot(), 'derek')
See `example.py <example.py>`__.
Testing
$ git clone https://github.com/keredson/boddle.git $ cd boddle $ python tests.py .......... ---------------------------------------------------------------------- Ran 10 tests in 0.001s OK
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
boddle-0.2.0.tar.gz
(2.5 kB
view hashes)