Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upImprove code coverage by including missing tests #13
Conversation
app.py
Outdated
| @@ -223,10 +223,10 @@ def get_redirect_uri(request): | |||
| """Return OAuth redirect URI.""" | |||
| parsed_url = urlparse(request.url) | |||
| if parsed_url.hostname == 'localhost': | |||
| return 'http://{hostname}:{port}/submit'.format( | |||
| return 'https://{hostname}:{port}/submit'.format( | |||
zheller
Aug 22, 2014
Contributor
are you sure we want to do this?
are you sure we want to do this?
ascandella
Aug 22, 2014
Contributor
do you mean me? all i did was fix the test by enabling debug mode. prior to that, literally every test was failing
do you mean me? all i did was fix the test by enabling debug mode. prior to that, literally every test was failing
ascandella
Aug 22, 2014
Contributor
also, i only enabled it for the test run, so it should not affect normal behavior
also, i only enabled it for the test run, so it should not affect normal behavior
app.py
Outdated
| hostname=parsed_url.hostname, port=parsed_url.port | ||
| ) | ||
| return 'https://{hostname}/submit'.format(hostname=parsed_url.hostname) | ||
|
|
||
| if __name__ == '__main__': | ||
| app.run(port=7000) | ||
| app.run(port=7000, ssl_context='adhoc') |
zheller
Aug 22, 2014
Contributor
what does this mean?
what does this mean?
kaushal
Aug 22, 2014
Author
Contributor
http://kracekumar.com/post/54437887454/ssl-for-flask-local-development
It's just local development mode. We use the secret key from line 14
http://kracekumar.com/post/54437887454/ssl-for-flask-local-development
It's just local development mode. We use the secret key from line 14
|
These should probably be two separate pull requests. |
test/test_endpoints.py
Outdated
| session['access_token'] = test_auth_token | ||
| with Betamax(app.requests_session).use_cassette('me_success'): | ||
| response = client.get('/me') | ||
| self.assertEquals(response.status_code, 200) |
zheller
Aug 22, 2014
Contributor
we should assert something about the body
we should assert something about the body
| session['access_token'] = test_auth_token | ||
| with Betamax(app.requests_session).use_cassette('submit_success'): | ||
| response = client.get('/submit?code=%s' % test_auth_code) | ||
| self.assertEquals(response.status_code, 200) |
zheller
Aug 22, 2014
Contributor
we should assert something about the body
we should assert something about the body
kaushal
Aug 22, 2014
Author
Contributor
(thumbsup)
(thumbsup)
kaushal
added a commit
that referenced
this pull request
Aug 22, 2014
Improve code coverage by including missing tests, and assertions
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
No description provided.