Skip to content
This repository has been archived by the owner on Apr 4, 2019. It is now read-only.

Commit

Permalink
Add test scaffolding for buchner
Browse files Browse the repository at this point in the history
  • Loading branch information
willkg committed Apr 3, 2013
1 parent 50e3bcb commit 560c598
Show file tree
Hide file tree
Showing 6 changed files with 34 additions and 1 deletion.
9 changes: 8 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,11 @@ can run your project immediately::
Run tests
=========

Buchner currently has no tests.
You need to install the development requirements::

$ pip install -r requirements-dev.txt


After that, you can run tests with::

nosetests
1 change: 1 addition & 0 deletions buchner/tests/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

20 changes: 20 additions & 0 deletions buchner/tests/test_helpers.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from nose.tools import eq_


from buchner.helpers import json_requested, jsonify, truthiness


def test_truthiness():
for s in ('t', 'true', 'TRUE', '1'):
eq_(truthiness(s), True)

for s in ('f', 'false', 'FALSE', '0'):
eq_(truthiness(s), False)

# TODO: Test funky data


# TODO: Test jsonify


# TODO: Test json_requested
2 changes: 2 additions & 0 deletions nose.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[nosetests]
ignore-files=project-template
2 changes: 2 additions & 0 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Flask
nose
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ def get_version():
packages=find_packages(),
include_package_data=True,
install_requires=[],
test_suite='nose.collector',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: Web Environment',
Expand Down

0 comments on commit 560c598

Please sign in to comment.