-
Notifications
You must be signed in to change notification settings - Fork 0
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 #38 from SammyTbeile/master
Tagged Tests
- Loading branch information
Showing
5 changed files
with
132 additions
and
5 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 |
---|---|---|
|
@@ -38,11 +38,13 @@ def register(self, username, name, email, phone, dorm_building, | |
confirm=confirm | ||
), follow_redirects=True) | ||
|
||
# Iteration 1 | ||
def test_login_failure(self): | ||
print("testing that failed login returns the login page") | ||
rv = self.login('wrong', 'test') | ||
assert 'Login' in str(rv.data) | ||
|
||
# Iteration 1 | ||
def test_register(self): | ||
print("testing registration") | ||
rv = self.register( | ||
|
@@ -55,6 +57,7 @@ def test_register(self): | |
'a') | ||
assert 'Login' in str(rv.data) | ||
|
||
# Post iteration 1 | ||
def test_double_register(self): | ||
print("testing double registration") | ||
self.register( | ||
|
@@ -75,6 +78,7 @@ def test_double_register(self): | |
'a') | ||
assert 'Username is not unique' in str(rv.data) | ||
|
||
# Iteration 1 | ||
def test_invalid_registration(self): | ||
print("testing invalid registration") | ||
rv = self.register( | ||
|
@@ -87,7 +91,7 @@ def test_invalid_registration(self): | |
'b') | ||
assert 'Invalid registration' in str(rv.data) | ||
|
||
|
||
# Iteration 1 | ||
def test_login(self): | ||
print("testing login") | ||
User(username='tester', password='a', email='[email protected]', | ||
|
@@ -96,11 +100,13 @@ def test_login(self): | |
rv = self.login('tester', 'a') | ||
assert 'Feed' in str(rv.data) | ||
|
||
# Iteration 1 | ||
def test_logout(self): | ||
print("test logout") | ||
rv = self.logout() | ||
assert 'Login' in str(rv.data) | ||
|
||
# Post iteration 1 | ||
def test_is_authenticated(self): | ||
print("test is_authenticated") | ||
user = User(username='tester', password='a', email='[email protected]', | ||
|
@@ -109,13 +115,15 @@ def test_is_authenticated(self): | |
result = user.is_authenticated() | ||
assert (result == True) | ||
|
||
# Post iteration 1 | ||
def test_is_active(self): | ||
print("test is_active") | ||
user = User(username='tester', password='a', email='[email protected]', | ||
phone='1234567890', name='a', dorm_building='a', | ||
confirm='a').save() | ||
assert (user.is_active() == True) | ||
|
||
# Post iteration 1 | ||
def test_is_anonymous(self): | ||
print("test is_anonymous") | ||
user = User(username='tester', password='a', email='[email protected]', | ||
|
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,113 @@ | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine is deprecated, use flask_mongoengine instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf is deprecated, use flask_mongoengine.wtf instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.orm is deprecated, use flask_mongoengine.wtf.orm instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.fields is deprecated, use flask_mongoengine.wtf.fields instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.models is deprecated, use flask_mongoengine.wtf.models instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.base is deprecated, use flask_mongoengine.wtf.base instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:34: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = RegistrationForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:34: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = RegistrationForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:34: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = RegistrationForm(request.form) | ||
..../mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:34: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = RegistrationForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
. | ||
---------------------------------------------------------------------- | ||
Ran 9 tests in 2.072s | ||
|
||
OK | ||
testing double registration | ||
testing invalid registration | ||
test is_active | ||
test is_anonymous | ||
test is_authenticated | ||
testing login | ||
testing that failed login returns the login page | ||
test logout | ||
testing registration | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine is deprecated, use flask_mongoengine instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf is deprecated, use flask_mongoengine.wtf instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.orm is deprecated, use flask_mongoengine.wtf.orm instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.fields is deprecated, use flask_mongoengine.wtf.fields instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.models is deprecated, use flask_mongoengine.wtf.models instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.wtf is deprecated, use flask_wtf instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/usr/local/lib/python2.7/dist-packages/flask/exthook.py:71: ExtDeprecationWarning: Importing flask.ext.mongoengine.wtf.base is deprecated, use flask_mongoengine.wtf.base instead. | ||
.format(x=modname), ExtDeprecationWarning | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
/mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
./mnt/c/Users/Sammy/Documents/MEGAsync/Documents/Columbia Junior Year/Advanced Software Engineering/ss-ase/ss-ase/app/login/controllers.py:13: FlaskWTFDeprecationWarning: "flask_wtf.Form" has been renamed to "FlaskForm" and will be removed in 1.0. | ||
form = LoginForm(request.form) | ||
. | ||
---------------------------------------------------------------------- | ||
Ran 7 tests in 4.727s | ||
|
||
OK | ||
Testing adding a listing with invalid attributes | ||
Testing adding a listing with valid attributes | ||
testing getting the feed while authenticated | ||
testing getting the feed while unauthorized | ||
testing getting an item | ||
tetsting getting the listing | ||
testing getting the index | ||
Name Stmts Miss Cover | ||
-------------------------------------------------------------- | ||
ss-ase/app/__init__.py 12 0 100% | ||
ss-ase/app/feed_module/__init__.py 0 0 100% | ||
ss-ase/app/feed_module/controllers.py 80 41 49% | ||
ss-ase/app/feed_module/models.py 9 0 100% | ||
ss-ase/app/login/__init__.py 0 0 100% | ||
ss-ase/app/login/controllers.py 37 1 97% | ||
ss-ase/app/login/forms.py 14 0 100% | ||
ss-ase/app/login/models.py 23 1 96% | ||
ss-ase/config.py 6 0 100% | ||
ss-ase/test_listing.py 76 0 100% | ||
ss-ase/test_login.py 58 0 100% | ||
-------------------------------------------------------------- | ||
TOTAL 315 43 86% | ||
[localhost] local: coverage run --rcfile=.coveragerc ./ss-ase/test_login.py | ||
[localhost] local: coverage run --rcfile=.coveragerc -a ./ss-ase/test_listing.py | ||
[localhost] local: coverage report > coverage.txt | ||
[localhost] local: coverage report | ||
|
||
Done. |