Skip to content
Myr

Blueprint example tests

Before adoption: this commit came in with the history the project adopted, so no landing records it.

authored by Dmitry Shevchenko · committed by Dmitry Shevchenko · parent 85ad4ff · Browse files · 1 file+36 added−0 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

1 file+36 added−0 removed

  • other:+36 added−0 removed

1 file+36 added−0 removed

added:examples/blueprintexample/blueprintexample_test.py+36 added
1# -*- coding: utf-8 -*-2"""3 Blueprint Example Tests4 ~~~~~~~~~~~~~~56 Tests the Blueprint example app7"""8import blueprintexample9import unittest101112class BlueprintExampleTestCase(unittest.TestCase):1314 def setUp(self):15 self.app = blueprintexample.app.test_client()16 17 def test_urls(self):18 r = self.app.get('/')19 self.assertEquals(r.status_code, 200)20 21 r = self.app.get('/hello')22 self.assertEquals(r.status_code, 200)23 24 r = self.app.get('/world')25 self.assertEquals(r.status_code, 200)26 27 #second blueprint instance28 r = self.app.get('/pages/hello')29 self.assertEquals(r.status_code, 200)30 31 r = self.app.get('/pages/world')32 self.assertEquals(r.status_code, 200)33 34 35if __name__ == '__main__':36 unittest.main()