-
-
Notifications
You must be signed in to change notification settings - Fork 294
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
Add TestBugAdmin file #1446
Add TestBugAdmin file #1446
Conversation
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.
More changes needed:
- squash both commits together
- commit log message can be better - from the diff itself it is obvious that a new file is added and what it's name is, and the name is not
TestBugAdmin
. See this reference for how to write a good commit log: https://chris.beams.io/posts/git-commit/
Codecov Report
@@ Coverage Diff @@
## master #1446 +/- ##
==========================================
+ Coverage 76.26% 76.28% +0.02%
==========================================
Files 123 123
Lines 4580 4580
Branches 547 547
==========================================
+ Hits 3493 3494 +1
+ Misses 912 911 -1
Partials 175 175
Continue to review full report at Codecov.
|
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.
Also ignored from previous review:
- squash all commits together
- commit log message can be better - from the diff itself it is obvious that a new file is added and what it's name is, and the name is not TestBugAdmin. See this reference for how to write a good commit log: https://chris.beams.io/posts/git-commit/
Yes that is easy too long :)
…On Sun, Mar 29, 2020, 23:02 Alexander Todorov ***@***.***> wrote:
***@***.**** requested changes on this pull request.
Also ignored from previous review:
- squash all commits together
- commit log message can be better - from the diff itself it is
obvious that a new file is added and what it's name is, and the name is not
TestBugAdmin. See this reference for how to write a good commit log:
https://chris.beams.io/posts/git-commit/
------------------------------
In tcms/bugs/tests/test_admin.py
<#1446 (comment)>:
> @@ -0,0 +1,20 @@
+# -*- coding: utf-8 -*-
+# pylint: disable=invalid-name
+from django.urls import reverse
+from tcms.tests import LoggedInTestCase
+from tcms.utils.permissions import initiate_user_with_default_setups
+
+
+class TestBugAdmin(LoggedInTestCase):
+ '''
+ Class to test Admin view bugs-related functionalities
+ '''
See pylint errors
------------------------------
In tcms/bugs/tests/test_admin.py
<#1446 (comment)>:
> +from django.urls import reverse
+from tcms.tests import LoggedInTestCase
+from tcms.utils.permissions import initiate_user_with_default_setups
+
+
+class TestBugAdmin(LoggedInTestCase):
+ '''
+ Class to test Admin view bugs-related functionalities
+ '''
+
+ @classmethod
+ def setUpTestData(cls):
+ super().setUpTestData()
+ initiate_user_with_default_setups(cls.tester)
+
+ def test_user_being_redirected_to_add_bug_form(self):
Naming ! test_add_view_redirects_to_new_bug_page
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#1446 (review)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAAYGIK7JT6Y4ADHEMWXUYTRJ6SL3ANCNFSM4LPS5AHQ>
.
|
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.
Make pylint happy & squash all commits into 1
ac4b935
to
3d0ea7d
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.
Make pylint happy
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.
Minor changes requested.
Squash commits together.
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.
Rebase & squash your commits. The PR contains unrelated changes which should not be the case.
Add tests for bugs in admin view Remove doc string Remove doc string
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.
Drop the merge commit and the unrelated changes from the 1st commit.
Closed in favor of #1642 |
Created test_admin file to test BugAdmin view => if on admin page a user can click and be redirected to the new-bug form