This repository has been archived by the owner on Aug 8, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from YoLoveLife/devel
LiveServerTestCase
- Loading branch information
Showing
7 changed files
with
83 additions
and
15 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding:utf-8 -*- | ||
from django.test import TestCase,Client,LiveServerTestCase | ||
# from validate.models import ExtendUser | ||
# Create your tests here. | ||
|
||
|
||
#view test | ||
# class IndexPageTestCase(LiveServerTestCase): | ||
# port = 8000 | ||
# def setUp(self): | ||
# self.user=ExtendUser.objects.create(username='yz2',first_name='Yu',last_name='Zhou') | ||
# self.user.set_password('testuser') | ||
# self.user.save() | ||
# self.c = Client(HTTP_USER_AGENT='Mozilla/5.0') | ||
# self.c.login(username='yz2',password='testuser') | ||
# self.c.force_login(self.user) | ||
# | ||
# def test_indexpage(self): | ||
# response = self.c.get('/') | ||
# self.assertEqual(response.status_code,200) | ||
# | ||
# def test_404page(self): | ||
# response = self.c.get('/404') | ||
# self.assertEqual(response.status_code,301) | ||
# | ||
# def test_permissionpage(self): | ||
# response = self.c.get('/permission') | ||
# self.assertEqual(response.status_code,301) |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,4 +28,5 @@ pycrypto==2.6.1 | |
pytz==2017.2 | ||
requests==2.18.4 | ||
six==1.10.0 | ||
selenium==3.5.0 | ||
urllib3==1.22 |