Created
December 31, 2012 00:19
-
-
Save Freso/4416300 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python2 | |
# -*- coding: utf-8 -*- | |
"""Test coverage for MusicBottle.""" | |
import musicbottle | |
from flask.ext.testing import TestCase | |
class MusicBottleTestCase(TestCase): | |
def create_app(self): | |
musicbottle.app.config['TESTING'] = True | |
return musicbottle.app | |
def test_index_page(self): | |
rv = self.client.get('/') | |
assert '<h1>Hello from The Bottle!</h1>' in rv.data | |
class CodeStyleTestCase(TestCase): | |
"""Tests that the code complies to coding style.""" | |
def __init__(self): | |
import pep8 | |
self.pep8 = pep8 | |
def test_pep8_compliance(self): | |
def main(): | |
"""Main program. Run the tests.""" | |
import unittest | |
unittest.main() | |
if __name__ == "__main__": | |
main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment