[Django] #26022: rewrite django admin register decorator some test

8 views
Skip to first unread message

Django

unread,
Jan 1, 2016, 7:19:23 AM1/1/16
to django-...@googlegroups.com
#26022: rewrite django admin register decorator some test
--------------------------------------+--------------------
Reporter: hramezani | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Uncategorized | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
--------------------------------------+--------------------
rewrite below django admin register decorator test in context manager
version:
* test_wrapped_class_not_a_model_admin
* test_custom_site_not_an_admin_site

--
Ticket URL: <https://code.djangoproject.com/ticket/26022>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 1, 2016, 7:19:53 AM1/1/16
to django-...@googlegroups.com
#26022: rewrite django admin register decorator some test
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by hramezani):

* status: new => assigned
* needs_better_patch: => 0
* component: Uncategorized => Testing framework
* needs_tests: => 0
* owner: nobody => hramezani
* needs_docs: => 0


--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:1>

Django

unread,
Jan 1, 2016, 7:33:06 AM1/1/16
to django-...@googlegroups.com
#26022: rewrite django admin register decorator some test
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by hramezani):

* has_patch: 0 => 1


Comment:

Pull request: https://github.com/django/django/pull/5912

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:2>

Django

unread,
Jan 1, 2016, 8:13:47 AM1/1/16
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate

-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted

Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* needs_better_patch: 0 => 1
* version: 1.9 => master
* stage: Unreviewed => Accepted


Comment:

As noted on the pull request, a more comprehensive cleanup would be
appreciated.

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:3>

Django

unread,
Jan 29, 2016, 12:37:11 PM1/29/16
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"3d0dcd7f5af378d3ab6adb303b913e6c7b2e0ee5" 3d0dcd7]:
{{{
#!CommitTicketReference repository=""
revision="3d0dcd7f5af378d3ab6adb303b913e6c7b2e0ee5"
Refs #26022 -- Used context manager version of assertRaises in tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:4>

Django

unread,
Jan 29, 2016, 1:07:14 PM1/29/16
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"253adc2b8a52982139d40c4f55b3fd446e1cb8f3" 253adc2]:
{{{
#!CommitTicketReference repository=""
revision="253adc2b8a52982139d40c4f55b3fd446e1cb8f3"
Refs #26022 -- Used context manager version of assertRaisesMessage in
tests.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:5>

Django

unread,
Jan 29, 2016, 1:39:01 PM1/29/16
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: assigned
Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

In [changeset:"26ad01719d73823e65c0358a2ee9941e0a888a63" 26ad0171]:
{{{
#!CommitTicketReference repository=""
revision="26ad01719d73823e65c0358a2ee9941e0a888a63"
Refs #26022 -- Replaced six.assertRaisesRegex with assertRaisesMessage as
appropriate.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:6>

Django

unread,
Jan 29, 2016, 1:41:57 PM1/29/16
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate
-------------------------------------+-------------------------------------
Reporter: hramezani | Owner: hramezani
Type: | Status: closed

Cleanup/optimization |
Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: assigned => closed
* resolution: => fixed


--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:7>

Django

unread,
Apr 29, 2019, 2:31:58 AM4/29/19
to django-...@googlegroups.com
#26022: Use the context manager version of assertRaises decorators where
appropriate
-------------------------------------+-------------------------------------
Reporter: Hasan Ramezani | Owner: Hasan
Type: | Ramezani
Cleanup/optimization | Status: closed

Component: Testing framework | Version: master
Severity: Normal | Resolution: fixed
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 1
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

In [changeset:"5627057f63f30bda6bbef7e8169c2a6156542f90" 5627057f]:
{{{
#!CommitTicketReference repository=""
revision="5627057f63f30bda6bbef7e8169c2a6156542f90"


Refs #26022 -- Used context manager version of assertRaisesMessage in
tests.

Follow up to 253adc2b8a52982139d40c4f55b3fd446e1cb8f3.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/26022#comment:8>

Reply all
Reply to author
Forward
0 new messages