summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* Add forgotten __init__.py filesAnton Khirnov2021-01-31
|
* db/envelope: move to a new module "mail"Anton Khirnov2021-01-30
| | | | It has nothing to do with the database.
* db/envelope: switch to the "new" (EmailMessage) python APIAnton Khirnov2021-01-30
| | | | | | | | | | email.mime is a part of the old API, which does not mix well with the new one (i.e. when email.policy.SMTP is used), specifically when non-ASCII headers are used. Additionally, clean the APIs that accept either EmailMessage or a str to only expect EmailMessage. Supporting both just adds confusion and complexity.
* db/manager: Drop async methodDylan Baker2021-01-10
| | | | | | | | | | As far as I can tell using a separate process doesn't actually improve performance, it makes it worse. The work that we're passing off to the separate function isn't necessarily work that's well suited to being handed off, there isn't a lot of computation and the objects that need to be passed across the pipe are fairly large (at least when considering a pipe). Converting the function to a generator gives better performance and simplifies the implementation.
* db/manager: drop support for adding/removing queriesAnton Khirnov2020-05-08
| | | | | This is not implemented in notmuch2 and does not really belong in alot. It can be done better through the notmuch utility.
* Update tests.Anton Khirnov2020-03-05
| | | | Drop some tests for removed functions.
* db/message: remove unnecessary get_params()Anton Khirnov2020-03-05
|
* db/message: drop a useless getter.Anton Khirnov2020-02-27
|
* Update tests.Anton Khirnov2020-02-27
| | | | Drop useless db/thread test.
* db: rewrite the API for representing message treesAnton Khirnov2020-02-06
| | | | | It should be cleaner and easier to use, and eventually replace the custom tree walker in the thread display buffer.
* db/message: forbid instantiating Message with thread = NoneAnton Khirnov2020-02-06
| | | | It should always be instantiated from a Thread instance.
* tests: run 'gpg' instead of obsolete 'gpg2'Anton Khirnov2020-02-03
|
* Let python decode the message transfer encoding.Anton Khirnov2020-02-03
|
* Revert "db/manager: Drop async method"Anton Khirnov2020-01-02
| | | | This reverts commit e7e0c52db9093a9ecd9dcaa0766e66515a546a75.
* envelope: fix header key:value parsing regressionpacien2019-11-23
| | | | | Fixes an issue introduced in 45829f7956716638fe77989a50eb87d3ea34cace which made header values containing ':' break the parser.
* envelope: correctly handle folded headerspacien2019-11-23
|
* Fix compatibility with Python 3.8Felix Yan2019-11-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error handling code needs tearDown_exceptions in the new version of Python. Otherwise the following error appears: ``` Traceback (most recent call last): File "setup.py", line 7, in <module> setup( File "/usr/lib/python3.8/site-packages/setuptools/__init__.py", line 145, in setup return distutils.core.setup(**attrs) File "/usr/lib/python3.8/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.8/distutils/dist.py", line 966, in run_commands self.run_command(cmd) File "/usr/lib/python3.8/distutils/dist.py", line 985, in run_command cmd_obj.run() File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 229, in run self.run_tests() File "/usr/lib/python3.8/site-packages/setuptools/command/test.py", line 247, in run_tests test = unittest.main( File "/usr/lib/python3.8/unittest/main.py", line 101, in __init__ self.runTests() File "/usr/lib/python3.8/unittest/main.py", line 271, in runTests self.result = testRunner.run(self.test) File "/usr/lib/python3.8/unittest/runner.py", line 176, in run test(result) File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.8/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.8/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.8/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.8/unittest/suite.py", line 122, in run test(result) File "/usr/lib/python3.8/unittest/suite.py", line 84, in __call__ return self.run(*args, **kwds) File "/usr/lib/python3.8/unittest/suite.py", line 112, in run self._tearDownPreviousClass(test, result) File "/usr/lib/python3.8/unittest/suite.py", line 301, in _tearDownPreviousClass if len(previousClass.tearDown_exceptions) > 0: AttributeError: type object 'TestSettingsManagerGetAccountByAddress' has no attribute 'tearDown_exceptions' ```
* Remove unicode literals syntax from python2Lucas Hoffmann2019-11-06
|
* Fix tests to reflect new messages.Pol Van Aubel2019-11-02
|
* fix display of HTML-only mailsMichael J Gruber2019-09-06
| | | | | | | | "Prefer plain text" should mean just that, and not "ignore HTML even in the absence of a text part". 21c399ee ("Update to new (3.6) email message API", 2018-12-08) had introduced the "ignore" behaviour. Make it "prefer" again.
* tests: test prefer_text with HTML-only mailsMichael J Gruber2019-09-06
|
* tests: use new Completer locationsPatrick Totzke2019-08-17
|
* db/manager: Drop async methodDylan Baker2019-08-15
| | | | | | | | | | As far as I can tell using a separate process doesn't actually improve performance, it makes it worse. The work that we're passing off to the separate function isn't necessarily work that's well suited to being handed off, there isn't a lot of computation and the objects that need to be passed across the pipe are fairly large (at least when considering a pipe). Converting the function to a generator gives better performance and simplifies the implementation.
* unused imports and variablesPatrick Totzke2019-08-15
|
* Use unittest.mock from the stdlibLucas Hoffmann2019-08-15
| | | | It was added to the stdlib in py3.3 and we already require 3.5.
* adjust tests to use the new EmailMessage APIPatrick Totzke2019-08-15
|
* remove duplicate and pointless testsPatrick Totzke2019-08-15
|
* remove unused importsPatrick Totzke2019-08-11
|
* ContactsCompletion: use db.utils.formataddrMichael J Gruber2019-08-10
| | | | | | | | | | | | email.utils.formataddr does more encoding than we need at this point - headers will be encoded when they get inserted anyway. Use db.utils.formataddr instead. Fixes #1378 Note that some tests need to be (and are) changed: The expectation of the old tests was to get a completely escaped result. Also, add an umlaut test.
* Remove expiration time from gpg keys in the test suiteLucas Hoffmann2019-07-21
| | | | | | | | | | | | | | | | | | | | | | | | | The keys were expired and thus the tests were failing. In order to remove the expiration time the following actions were taken: Creating a temporary directory to use as GNUPGHOME, importing all the keys: mkdir tmp export GNUPGHOME=$PWD/tmp gpg --import tests/static/gpg-keys/*sec.gpg For each of the three keys the expiration time was set to unlimited and they were reexported (the ones that were not ascii armored before were again exported without the `--armor` option): gpg --edit-key $KEY_ID gpg --export --armor $KEY_ID > $PUB_FILE gpg --export-secret-keys --armor $KEY_ID > $SEC_FILE Finally: rm -rf $GNUPGHOME unset GNUPGHOME
* tests: db.utils.formataddrPatrick Totzke2019-06-02
|
* tests: move tests for db.utils.clear_my_addressPatrick Totzke2019-06-02
|
* tests: move test for utils.ensure_unique_addressPatrick Totzke2019-06-02
|
* tests: add case for exchange formatted realnamesPatrick Totzke2019-05-27
|
* fix testsPatrick Totzke2019-05-11
| | | | | ComposeCommand._set_gpg_sign will now read off the account from self.envelope and not separate parameters.
* remove test for ComposeCommand._set_from..Patrick Totzke2019-05-11
| | | | .. which was replaced earlier
* fix pyflakes issuesPatrick Totzke2019-05-11
|
* tests/commands/globals: Rename tests to better fit the methods they testDylan Baker2019-05-11
|
* commands/globals simplify test for issue #1277Patrick Totzke2019-05-11
|
* tests/commands/globals: Simplify signing testsPatrick Totzke2019-05-11
|
* tests/commands/globals: Simplify template_decode testPatrick Totzke2019-05-11
|
* restore lenient libmagic decodingMichael J Gruber2019-02-07
| | | | | | | | 176cffcd ("refactor alot.db.utils.remove_cte", 2018-12-04) created a few problems with 8bit quoted-printable e-mails, see #1291 #1360. This commit restores the old libmagic fallback which did not cause this problem.
* Rename test filesLucas Hoffmann2019-01-29
| | | | | | | | The two main reasons are - to run `python3 -m unittest discover` without specifying a custom `--pattern *_test.py` - to include the test files automatically when generating the MANIFEST file.
* Add test case for new encoding problemsLucas Hoffmann2018-12-24
|
* update tagstring tests for regex behaviorWill Dietz2018-12-22
| | | | | | * Fix (invert) existing test * Add new tests based on behavior mentioned previously * test to ensure translations using re.sub work
* tests: Require python3 in test_env_setJordan Justen2018-12-19
| | | | | Fixes: https://github.com/pazz/alot/issues/1354 Signed-off-by: Jordan Justen <jordan.l.justen@intel.com>
* rename get_account_by_address to account_matching_addressvrs2018-12-10
| | | | | ... since accounts' addresses can overlap and get_account_by_address promises too much. Also remove now-obsolete get_addresses.
* match addresses against accounts, not address listsvrs2018-12-10
| | | | fixes #1230, fixes an unfiled bug in clear_my_address()
* attach accounts to envelopesvrs2018-12-10
| | | | simplifies a few tests, fixes #1177
* refactor test_issue_1291Patrick Totzke2018-12-07
| | | | | | this is now test_char_vs_cte_mismatch; It checks if a mime part contains a character which is not encoded in the encoding declared in the Content-Transfer-Encoding header