test

请不要把重要的私人代码放到本gitlab服务器,本服务器是用于测试和学习,会不定期清理私人的代码仓库,敬请谅解。

Commit 62bcc375 authored by penxiao's avatar penxiao

change unittest for footer

Signed-off-by: penxiao's avatarPeng Xiao <penxiao@cisco.com>
parent 3040f9c9
......@@ -4,4 +4,4 @@
<span>© <a href="mailto:michael@realpython.com">Real Python</a></span>
</small>
</div>
</footer>
\ No newline at end of file
</footer>
# Copyright 2016 Cisco Systems, Inc.
# All rights reserved.
from flask_testing import TestCase
......
# tests/helpers.py
# Copyright 2016 Cisco Systems, Inc.
# All rights reserved.
import unittest
......
# Copyright 2016 Cisco Systems, Inc.
# All rights reserved.
import unittest
......@@ -14,6 +15,11 @@ class TestMainBlueprint(BaseTestCase):
self.assertIn(b'Welcome!', response.data)
self.assertIn(b'Register/Login', response.data)
def test_footer(self):
response = self.client.get('/', follow_redirects=True)
self.assertEqual(response.status_code, 200)
self.assertIn(b'Real Python', response.data)
def test_about(self):
# Ensure about route behaves correctly.
response = self.client.get('/about', follow_redirects=True)
......
# Copyright 2016 Cisco Systems, Inc.
# All rights reserved.
import datetime
import unittest
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment