Skip to content
This repository has been archived by the owner on Jul 29, 2020. It is now read-only.

Adding testing instructions #109

Merged
merged 4 commits into from
Sep 28, 2016
Merged

Adding testing instructions #109

merged 4 commits into from
Sep 28, 2016

Conversation

mortonjt
Copy link
Contributor

No description provided.

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.118% when pulling b17fb3d on mortonjt-patch-1 into 441c9b9 on master.

-------

To run the webserver locally, first run the following commands to insert a user with administrative access::

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also add the SQL commands to select the right database.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

**User:** master

**Password:** password

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a note about the test behaviour, i.e. the access of the "test" user is re-set after each unit test.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done!

@coveralls
Copy link

Coverage Status

Coverage remained the same at 75.118% when pulling 2859a12 on mortonjt-patch-1 into 441c9b9 on master.


**Password:** password

Note that whenever a unittest is run, the user `test` is granted admin rights, which is reset once the unittest is completed.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I believe this is only the case if mock_admin_login is used

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right

@coveralls
Copy link

Coverage Status

Coverage increased (+6.1%) to 81.244% when pulling c2946f3 on mortonjt-patch-1 into 441c9b9 on master.

@josenavas
Copy link
Member

How is the change on the README.md changing the coverage to +6.1%?

@mortonjt
Copy link
Contributor Author

It was a very well tested readme :D

On Tue, Sep 20, 2016 at 4:12 PM, Jose Navas notifications@github.com
wrote:

How is the change on the README.md changing the coverage to +6.1%?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#109 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AD_a3QRZwKtgl86tTDZ5AZJTxmeenUQaks5qsGh2gaJpZM4KBDHY
.

@mortonjt
Copy link
Contributor Author

All comments have been addressed. Anything else left here?


**Password:** password

Note that whenever a unittest is run, the user `test` is granted admin rights, which is reset once the unittest is completed if `mock_admin_login` is called.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is still inaccurate. The user test is not implicitly granted admin rights

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you clarify exactly how this should be corrected?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete it? The statement is inaccurate

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To me, Jamie's description seems to be accurate, since tearDown() alters the 'test' user access level:
def tearDown(self): BaseHandler.get_current_user = self.orig_func # Remove all access privileges user may hve been given by a test db.alter_access_levels('test', []) super(TestHandlerBase, self).tearDown()
Which means that a manual change of the access rights for this user are overwritten by any unit test.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh. I see. The first part is not precise enough. 'test' only get admin rights if mock_login_admin or its manual equivalent db.alter_access_levels('test', [7]) is used, but not per default for every test in general.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let us rephrase the sentence like that:
"After executing our existing unit test suite, access level for the user 'test' will be reset to '', i.e. he won't be able to see most of the main menu items. Thus, adding a second user 'master' with admin privileges is quite useful."

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. Thanks @sjanssen2 ! @wasade do you have any thoughts on this current phrasing?

@coveralls
Copy link

Coverage Status

Coverage increased (+6.6%) to 81.715% when pulling 6c80cd3 on mortonjt-patch-1 into 441c9b9 on master.

@sjanssen2
Copy link
Collaborator

@josenavas @wasade would be cool to come to a decision rather we want to merge or not.

@wasade wasade merged commit 4fb2548 into master Sep 28, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants