| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | Verify warning is raised when calling MIMEAccept's init | Bert JW Regeer | 2018-01-01 | 1 | -3/+15 |
| | | |||||
| * | Place methods in alphabetical order. | Ira Lun | 2017-08-29 | 1 | -45/+45 |
| | | |||||
| * | Place imports in alphabetical order. | Ira Lun | 2017-08-29 | 1 | -3/+3 |
| | | |||||
| * | Improve AcceptLanguageValidHeader.basic_filtering. | Ira Lun | 2017-08-29 | 1 | -23/+41 |
| | | | | | | | | | | | | | | | | The main change here is to simplify the handling of duplicate ranges in the header. The RFC does not specify what to do when the same range appears in the header more than once, possibly with different qvalues and giving conflicting information. Previously, we chose which of the possibly conflicting versions of the range to use for matching by first checking if there was one with q=0, which would take priority; if one with q=0 was not found, we chose the one with the highest qvalue. Having given it a lot more thought, it now seems clear that this kind of special handling is not necessary -- the simplest way to handle it is to take the first appearance of the range in the header (from the left) and simple use that for matching. | ||||
| * | Remove obsolete tests. | Ira Lun | 2017-08-29 | 1 | -340/+0 |
| | | |||||
| * | Rewrite accept_property and add tests. | Ira Lun | 2017-08-29 | 1 | -0/+176 |
| | | |||||
| * | Add create_accept_header, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+21 |
| | | |||||
| * | Add AcceptInvalidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+399 |
| | | |||||
| * | Add AcceptNoHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+396 |
| | | |||||
| * | Add AcceptValidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+722 |
| | | |||||
| * | Rewrite Accept class, and add docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+256 |
| | | |||||
| * | Add accept_charset_property, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+116 |
| | | |||||
| * | Add create_accept_charset_header, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+21 |
| | | |||||
| * | Add AcceptCharsetInvalidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+213 |
| | | |||||
| * | Add AcceptCharsetNoHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+229 |
| | | |||||
| * | Add AcceptCharsetValidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+367 |
| | | |||||
| * | Remove obsolete tests. | Ira Lun | 2017-08-29 | 1 | -15/+0 |
| | | |||||
| * | Rewrite AcceptCharset class, and add docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+53 |
| | | | | | | | From the old AcceptCharset.parse: 'ISO-8859-1' was a default charset in early versions of HTTP/1.1, but this is no longer the case (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Accept-Charset) | ||||
| * | Remove now-unused NoAccept class. | Ira Lun | 2017-08-29 | 1 | -6/+0 |
| | | |||||
| * | Add Accept-Encoding-related imports. | Ira Lun | 2017-08-29 | 1 | -0/+5 |
| | | |||||
| * | Add accept_encoding_property and tests. | Ira Lun | 2017-08-29 | 1 | -0/+115 |
| | | |||||
| * | Add create_accept_encoding_header, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+20 |
| | | |||||
| * | Add AcceptEncodingInvalidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+268 |
| | | |||||
| * | Add AcceptEncodingNoHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+266 |
| | | |||||
| * | Add AcceptEncodingValidHeader class, docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+387 |
| | | |||||
| * | Rewrite AcceptEncoding class and add docs and tests. | Ira Lun | 2017-08-29 | 1 | -0/+53 |
| | | |||||
| * | Fix incorrect test. | Ira Lun | 2017-08-28 | 1 | -3/+3 |
| | | |||||
| * | Move .parse from AcceptLanguageValidHeader to AcceptLanguage. | Ira Lun | 2017-08-24 | 1 | -3/+5 |
| | | |||||
| * | Check and raise instead of using asserts. | Ira Lun | 2017-08-23 | 1 | -4/+4 |
| | | | | | As asserts may be turned off. | ||||
| * | Fix missing commas and spacing in single-element tuples. | Ira Lun | 2017-08-21 | 1 | -10/+10 |
| | | |||||
| * | Treat invalid header values like ``NoHeader``s when __add__ing. | Ira Lun | 2017-08-10 | 1 | -581/+211 |
| | | | | | | | | Instead of adding header values as strs, then deciding whether the result is a Valid-, Invalid-, or NoHeader, if the other operand represents an invalid header value, treat it as if it were an AcceptLanguageNoHeader. | ||||
| * | Change test imports to module scope. | Ira Lun | 2017-08-02 | 1 | -347/+205 |
| | | |||||
| * | Add functions to help with forming the regexes for parsing the headers. | Ira Lun | 2017-07-29 | 1 | -87/+113 |
| | | | | | | These functions will be useful with the other three Accept* headers, and reduce repetition of code and tests. | ||||
| * | Improve __repr__ of AcceptLanguage classes. | Ira Lun | 2017-07-29 | 1 | -2/+3 |
| | | | | | | | | | Restore functionality of AcceptLanguageValidHeader.__repr__ to that of Accept.__repr__ (but add a space before the round brackets to make it clearer that the value in the brackets is not an argument.) Remove unnecessary comments. | ||||
| * | Stop displaying header_value in AcceptLanguageValidHeader.__repr__. | Ira Lun | 2017-07-25 | 1 | -6/+2 |
| | | |||||
| * | Make __repr__ consistent between the AcceptLanguage classes. | Ira Lun | 2017-07-25 | 1 | -2/+2 |
| | | |||||
| * | Make AcceptLanguageValidHeader.__repr__ safer. | Ira Lun | 2017-07-25 | 1 | -3/+2 |
| | | | | | And test the actual string value after repr(). | ||||
| * | Make AcceptLanguageInvalidHeader.__repr__ safer. | Ira Lun | 2017-07-25 | 1 | -7/+2 |
| | | |||||
| * | Change variable name from ``accept_language`` to ``instance``. | Ira Lun | 2017-07-25 | 1 | -15/+15 |
| | | | | | To be consistent with other tests. | ||||
| * | Add tests for Accept.__iter__ and NilAccept.__iter__. | Ira Lun | 2017-07-24 | 1 | -0/+12 |
| | | | | | | | | | | | | | There were no unit tests for these methods before; they were only covered by functional tests in test_request.py calling `list(request.accept_language)`, and there were no tests for how these methods worked for the other headers. Once we switched Accept-Language classes away from using the Accept and NilAccept classes, these methods were no longer covered by any tests. This adds tests for the methods, mainly for coverage until we get to test them separately for the other Accept* headers. | ||||
| * | Add tests for .quality(). | Ira Lun | 2017-07-24 | 1 | -0/+20 |
| | | | | | | | | These are tests for Accept.quality() and NilAccept.quality() from test_quality, test_quality_not_found, and test_nil, appled to the Accept-Language header. (Previously AcceptLanguage.quality was not tested at all.) | ||||
| * | Add tests for ...NoHeader.best_match and ...InvalidHeader.best_match. | Ira Lun | 2017-07-24 | 1 | -0/+30 |
| | | | | | | | These tests for AcceptLanguageNoHeader.best_match and AcceptLanguageInvalidHeader.best_match are from the tests for NilAccept.best_match in test_nil_best_match. | ||||
| * | Add tests for AcceptLanguageValidHeader.best_match. | Ira Lun | 2017-07-24 | 1 | -0/+31 |
| | | | | | | | | | | | | | These tests were based on the tests for Accept.best_match in * test_zero_quality * test_best_match * test_best_match_with_one_lower_q * test_best_match_with_complex_q and applied to the Accept-Language header where appropriate, as previously there were no tests for AcceptLanguage.best_match. | ||||
| * | Assert that all three subclasses are instances of AcceptLanguage. | Ira Lun | 2017-07-23 | 1 | -0/+6 |
| | | |||||
| * | Make test methods' names and order consistent. | Ira Lun | 2017-07-23 | 1 | -23/+23 |
| | | |||||
| * | Add accept_language_property and tests. | Ira Lun | 2017-07-23 | 1 | -0/+133 |
| | | |||||
| * | Test NoHeader and InvalidHeader rather than InvalidOrNoHeader. | Ira Lun | 2017-07-22 | 1 | -50/+87 |
| | | | | | | Test interface (subclasses) rather than implementation (inherited class). | ||||
| * | Add __add__ and __radd__ for AcceptLanguageInvalidHeader, with tests. | Ira Lun | 2017-07-22 | 1 | -0/+428 |
| | | |||||
| * | Add __add__ and __radd__ for AcceptLanguageNoHeader, with tests. | Ira Lun | 2017-07-22 | 1 | -0/+183 |
| | | |||||
| * | Add __add__ and __radd__ for AcceptLanguageValidHeader, with tests. | Ira Lun | 2017-07-22 | 1 | -0/+245 |
| | | |||||
