Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User endpoint tests #888

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

carpecodeum
Copy link

Description

Added tests for User endpoints and fixed bug in UserManager.py to allow user to be deleted through the endpoint.

Related Issue #851

Motivation and Context

Tests should be present to allow the project maintainers to know that the endpoints arae working correctly.

How Has This Been Tested?

Screenshot 2020-02-15 at 12 26 07 AM

Screenshots (In case of UI changes):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@carpecodeum
Copy link
Author

@JaDogg this is a draft PR. Should I refactor the rest of the tests in the same way? Your inputs are highly welcome.

'Content-Type': 'application/x-www-form-urlencoded',
'Origin': 'http://localhost:3000',
}
user_data = {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Will we need to load these passwords/user_names from a config?

Copy link
Author

Choose a reason for hiding this comment

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

Right now these are just present in this file itself in future I will create a config to store this data.

Copy link
Collaborator

Choose a reason for hiding this comment

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

OK. 😀

Comment on lines +3 to +4
import logging as logger
from flask import g

Choose a reason for hiding this comment

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

Are these imports used? If not let's remove these.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants