Commit graph

15 commits

Author SHA1 Message Date
Rémy HUBSCHER
711b2e50b5
Run pre-commit on all files 2024-08-05 10:53:19 +02:00
Mariusz Felisiak
293403b807 Removed passing unused size parameter to was_modified_since().
The size parameter is unused because we pass timestamp and not the
If-Modified-Since HTML header.
2022-03-14 20:38:28 +01:00
Rémy HUBSCHER
6cd9ec3dd0
Fix test. 2020-09-18 10:50:26 +02:00
Rémy HUBSCHER
56e419bfc7
Add isort config. 2020-01-07 15:51:55 +01:00
Rémy HUBSCHER
6c7c8d9a60
Add isort support. 2020-01-07 15:19:22 +01:00
Rémy HUBSCHER
b094ed6cec
Add black support. 2020-01-07 15:12:51 +01:00
Rémy HUBSCHER
b893e52eba
Remove support for Python 2.7 2020-01-07 15:01:26 +01:00
Benoît Bryon
3a3d3ebb9f Refs #104 - Assert timestamp is passed to was_modified_since(). 2015-07-20 18:28:28 +02:00
Benoît Bryon
bdf8e6e368 Psycho-rebased work of @benesch and @zerc on top of master. 2015-07-20 18:14:08 +02:00
zero13cool
bf7b0f23fd Refs #104 - Convert datetime to unix timestamp 2015-07-16 22:00:27 +03:00
René Leonhardt
5e4ae2fdc9 Changed assertCalledOnceWith() to assert_called_once_with()
When I change assertCalledOnceWith() to assert_called_once_with(), make test succeeds but shows another failure:
```
AssertionError: Expected call: mock(sentinel.size, sentinel.modified_time)
Actual call: mock(sentinel.since, sentinel.modified_time, sentinel.size)
```
After changing the call accordingly, all 59 tests succeed.
2015-07-14 14:53:14 +02:00
Benoît Bryon
c54131db6e Refs #98 - Moved tests outside django-downloadview package, i.e. in tests/ folder at project root. 2015-06-12 15:42:50 +02:00
Benoît Bryon
d21d07c1e7 Refs #26 - Fixed assertIs() compatibility for Python<2.7 2013-05-28 15:21:55 +02:00
Benoît Bryon
121fb4d391 Refs #26 - Do not compute size of virtual files, unless file wrapper implements was_modified_since(). 2013-05-28 15:17:01 +02:00
Benoît Bryon
31c0a0f4b9 Refs #34 - Introduced unit tests for DownloadMixin.was_modified_since(). Refactored DownloadMixin: easier to test, better docstrings. 2013-05-14 00:25:30 +02:00