-
Notifications
You must be signed in to change notification settings - Fork 74
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
tests: coverage increase #67
Conversation
@@ -146,10 +146,10 @@ class RemoteToken(db.Model): | |||
secret = db.Column(db.Text(), default='', nullable=False) | |||
"""Used only by OAuth 1.""" | |||
|
|||
def __repr__(self): | |||
def __repr__(self): # pragma no cover |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding pragma no cover is not really the way to increase test coverage.
def test_token_repr(app):
"""..."""
assert 'Remote Token ...' == RemoteToken(...)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, assumed it was good practice as I saw it as an example on the documentation of coverage.py (http://coverage.readthedocs.io/en/coverage-4.0.3/excluding.html). Anyway, updated.
token_type='type').__repr__() | ||
|
||
assert 'Remote Account <id=1, user_id=1>' == \ | ||
RemoteAccount.get(user.id, "dev").__repr__() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
repr(RemoteAccount.get(user.id, "dev"))
@omelkonian Good job❗ Can you please have a look at my last comments and let me know when you update the PR? Thanks |
@jirikuncar LGTY? |
@omelkonian This branch is out-of-date with the base branch. |
@omelkonian please remove the merge commit. ( |
@jirikuncar i think its good to go |
@omelkonian see http://invenio.readthedocs.io/en/latest/technology/git.html#r2-remarks-on-commit-log-messages ( |
@omelkonian can you please rebase? |
request_token_params={'scope': ''}, | ||
base_url='https://foo.bar/', | ||
request_token_url=None, | ||
access_token_url="https://foo.bar/oauth/access_token", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please use consistently single quotes ('
)?
* Increases test coverage. (closes #59) Signed-off-by: Orestis Melkonian <melkon.or@gmail.com>
base_app.register_blueprint(blueprint_settings) | ||
|
||
# Try to sign-up client | ||
base_app.test_client().get(url_for("invenio_oauthclient.signup", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Signed-off-by: Orestis Melkonian <melkon.or@gmail.com>
Is it ok that I replaced string quotes to more places than I changed? |
@omelkonian normally it would be better to do replacement in separate commit and then include your chances. Would you find a time to do it this way and then rebase your commit on top? |
@jirikuncar I put it on a separate commit |
Signed-off-by: Orestis Melkonian melkon.or@gmail.com