-
Notifications
You must be signed in to change notification settings - Fork 26
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
Improve test coverage #88
Conversation
Codecov Report
@@ Coverage Diff @@
## master #88 +/- ##
==========================================
+ Coverage 56.29% 61.66% +5.36%
==========================================
Files 1 1
Lines 254 253 -1
==========================================
+ Hits 143 156 +13
+ Misses 111 97 -14
Continue to review full report at Codecov.
|
@YJDave: It seems like there is some issue with rebasing this branch. Please follow the best practices and keep your branch in sync with |
@singhpratyush Thanks for reviewing! |
e405a6e
to
7fd419c
Compare
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.
LGTM
def test_aggregations(self): | ||
"""Test aggregations.""" | ||
result = self.loklak.aggregations('fossasia', '2017-01-10', | ||
'2018-01-10', 10) | ||
data = result.json() | ||
self.assertEqual(result.status_code, 200) | ||
self.assertTrue('aggregations' in data) | ||
|
||
result = self.loklak.aggregations() | ||
self.assertEqual(result, '{"error": "No Query string has been given to run query for aggregations"}') | ||
# self.assertTrue('hashtags' in data['aggregations']) |
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.
Have you found solution to include fields? Please see this #75 (comment) for more info
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.
Not yet, but I will check it out soon.
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.
Squash commits!
@daminisatya These all commits have different features/functions/code added, so that in future if somethings goes wrong we can revert the particular commit. Same goes to PR #90 |
da7dd2a
to
224a425
Compare
@daminisatya Thanks for your advice. I have updated PR as we talked on channel. |
Add tests for getBaseUrl() method: - To improve the coverage of main code base. - To test functionality of getBaseUrl() method using assertion.
This commit get the 100% coverage of status() method by passing wrong url to method, to be sure that method does handle wrong url return proper result.
This commit add tests for: - Getting user with specific no of followers and following by passing no of followers and following as a query params. - Passing null argument to method, which should return proper error message.
This commits adds: - Proper response message on null query arguments. - Tests for aggregations() method with null query arguments.
Add tests for: - Getting result in specific time interval by passing date/hour argument to method. - Passing null query arguments for method which should return error with proper warning.
@daminisatya ^^ |
Try to improving code coverage by adding more tests for functions.