Skip to content

Instantly share code, notes, and snippets.

@Freso
Created December 31, 2012 00:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Freso/4416300 to your computer and use it in GitHub Desktop.
Save Freso/4416300 to your computer and use it in GitHub Desktop.
#!/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