Skip to content

Instantly share code, notes, and snippets.

@Freso Freso/gist:4416300
Created Dec 31, 2012

Embed
What would you like to do?
#!/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
You can’t perform that action at this time.