summaryrefslogtreecommitdiff
path: root/tests/db
Commit message (Collapse)AuthorAge
* db/utils: Support unicode in signaturesDylan Baker2017-07-24
| | | | | | Currently if a signature name has a non-ascii unicode character in it, the thread will fail to load because a UnicodeEncodeError. This patch fixes that by converting the str into unicode.
* tests/db/utils: Add tests for unicode as uidsDylan Baker2017-07-24
| | | | One of these tests is known to fail, and marked as xfail.
* tests/db/utils: share some mock biolerplateDylan Baker2017-07-24
|
* tests: move shared helpers out of crypto module into common moduleDylan Baker2017-07-24
|
* tests: Add some basic tests for alot.db.utils.add_signature_headerDylan Baker2017-07-24
| | | | | These are pretty basic, but they do cover most of the conditions, even if they rely heavily on mocking.
* tests: fix typo in module name envelop -> envelopeDylan Baker2017-07-10
|
* Use stdlib functions in db.utils.encode_headerLucas Hoffmann2017-06-30
| | | | | | | Instead of manual parsing with regexp and manual string formatting the functions from email.utils are used. This fixes some small inconsistencies with addresses with empty realnames and with commas in realnames.
* Add more tests for db.utils.encode_headerLucas Hoffmann2017-06-30
|
* Add helper function to quote test stringsLucas Hoffmann2017-06-21
|
* Add test for db.utils.decode_headerLucas Hoffmann2017-06-21
|
* Add test for db.utils.encode_headerLucas Hoffmann2017-06-21
|
* Add test for db.utils.extract_headersLucas Hoffmann2017-06-21
|
* Add test for db.utils.is_subdir_ofLucas Hoffmann2017-06-21
|
* Add test for db.utils.get_paramsLucas Hoffmann2017-06-21
|
* Use absolute_imports from __future__Lucas Hoffmann2017-01-18
|
* Port old doctests to unittest: alot.db.envelopeLucas Hoffmann2017-01-18
|
* typoPatrick Totzke2016-12-24
|
* db/thread: don't create multiple lists to sortDylan Baker2016-12-21
| | | | | | | | | | | | | | | Currently this function takes a list, splits into two lists based on whether or not a function returns None, sorts the list that isn't None, and then appends the list of None to the end. This creates 4 new concrete lists on each method call, requires the use of 3 filter + lambda pairs, and calls list.sort(). Pretty complicated and inefficient. This patch replaces that with a single sorted() function call with a kay function that replaces None with a value that is guaranteed to sort less than what Message.get_date() will return, but will not cause a comparison to None (which is an error in Python 3.x). This is all based on iterators and avoids the need for filter or list concatenation. This should result in only one new list being created.
* tests: Add tests for alot.db.thread.Thread.get_authorDylan Baker2016-12-21