View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0005023 | Taler | obsolete component | public | 2017-05-22 16:38 | 2018-04-15 20:34 |
| Reporter | Marcello Stanisci | Assigned To | Marcello Stanisci | ||
| Priority | normal | Severity | minor | Reproducibility | have not tried |
| Status | closed | Resolution | no change required | ||
| Product Version | git (master) | ||||
| Target Version | 0.5 | Fixed in Version | 0.5 | ||
| Summary | 0005023: Avoid django's TestCase class | ||||
| Description | Bank's testcases should import python's unittest module and run test against it, rather than import django's TestCase class. This way it's easier to catch errors before tests are run. For example, errors like django.db.utils.OperationalError are uncatchable by django's TestCase class. If instead we bypass all the django initialization logic and use python's unittest directly, we will have more freedom to check if the environment is OK and return accordingly. | ||||
| Tags | No tags attached. | ||||
|
|
WARNING: this way we lose the (HTTP) Client class exported by django. |
|
|
In what sense? Why can't we still use the HTTP class? |
|
|
FYI, you can see the implementation of the Django TestCase here: https://github.com/django/django/blob/538bf43458a147b7edeb7118c9f325c3f59ff6fb/django/test/testcases.py#L953 If necessary, we have to do our own subclass. |
|
|
@12151: I thought that we wanted to fire every testcase class coming from Django, but yes, there is no strong reason to not mix things when it's necessary. |
|
|
The TestCase class from Django turned to be very useful, especially thanks to the 'assertJSONEqual' method and other helpers it has over the "bare" Python's unittest. Besides, now (88bef48) 'make check' does test the launcher against a database which is not found, so this bug is not that worth working on IMO. |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2017-05-22 16:38 | Marcello Stanisci | New Issue | |
| 2017-05-22 16:38 | Marcello Stanisci | Status | new => assigned |
| 2017-05-22 16:38 | Marcello Stanisci | Assigned To | => Marcello Stanisci |
| 2017-05-23 21:44 | Marcello Stanisci | Note Added: 0012150 | |
| 2017-05-23 21:51 | Florian Dold | Note Added: 0012151 | |
| 2017-05-23 21:55 | Florian Dold | Note Added: 0012152 | |
| 2017-05-23 22:26 | Marcello Stanisci | Note Added: 0012153 | |
| 2017-12-14 15:55 | Christian Grothoff | Product Version | => git (master) |
| 2017-12-14 15:55 | Christian Grothoff | Target Version | => 0.6 |
| 2017-12-23 12:56 | Marcello Stanisci | Status | assigned => resolved |
| 2017-12-23 12:56 | Marcello Stanisci | Resolution | open => no change required |
| 2017-12-23 12:56 | Marcello Stanisci | Note Added: 0012703 | |
| 2017-12-28 17:28 | Christian Grothoff | Fixed in Version | => 0.5 |
| 2017-12-28 17:28 | Christian Grothoff | Target Version | 0.6 => 0.5 |
| 2018-04-15 20:34 | Christian Grothoff | Status | resolved => closed |
| 2022-08-23 20:26 | Christian Grothoff | Category | bank (demonstrator) => py bank (demonstrator, obsolete) |
| 2023-12-03 01:23 | Christian Grothoff | Category | py bank (demonstrator, obsolete) => obsolete componet |
| 2023-12-11 20:08 | Florian Dold | Category | obsolete componet => obsolete component |