summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
...
* Use urwid.util.detected_encoding instead of try_decodeDylan Baker2018-03-06
| | | | | Commands running in a subprocess should return the terminal encoding so we don't need to guess their encoding.
* tests/commands/utils_tests: use assertCountEqual for comparing listsDylan Baker2018-03-01
| | | | | Which compares that the lists have the same elements, but doesn't check their order.
* tests/command/utils_tests: fix for py3kDylan Baker2018-03-01
|
* Fix some of the quoted words tests for py3kDylan Baker2018-03-01
|
* fix a bunch of utils tests for py3kDylan Baker2018-03-01
| | | | | There are a few that are still broken because of bytes to unicode conversion, and this may not all be correct, but most of the tests pass
* helper: py3k fixesDylan Baker2018-03-01
|
* alot/command/envelope: py3k fixesDylan Baker2018-03-01
|
* tests/addressbook/abook_test: fix for py3kDylan Baker2018-03-01
|
* tests/db/thread: Fix tests for py3kDylan Baker2018-03-01
|
* settings/manager: fix managerDylan Baker2018-03-01
|
* crypto: use bytes instead of strDylan Baker2018-03-01
| | | | | | | | The crypto code shouldn't use unicode strings, it should use byte strings. The problem with using unicode strings (and doing the conversion internally), is that the crypto code doesn't know what the encoding should be. We can guess but it's better to just do bytes in bytes out, and let the calling code deal with encoding and decoding.
* Fix cryptoDylan Baker2018-03-01
| | | | | | This makes me a little nervous. I wonder if we're better off leaving the bits that gpg works with as bytes while gpg is working with them and do the string transformation later.
* fix account.pyDylan Baker2018-03-01
|
* replace xrange with rangeDylan Baker2018-03-01
| | | | In python 3 xrange is range, to get a list one must wrap range in list.
* Move screen stop/start logic into context manager.Thomas Nixon2018-02-19
| | | | | | | As well as reducing duplication and adding screen size detection to :pipeto and :pyshell, this ensures that the screen is always restarted, resulting in cleaner error handling if an error occurs while the screen is stopped.
* Move mock ui creation to function.Thomas Nixon2018-02-19
|
* Add test: template not decoded properly.Julian Mehne2018-02-15
|
* Expand environment variables when reading the config file.Julian Mehne2018-01-23
|
* Set changed values in mock.patch.dict call itself.Julian Mehne2018-01-23
|
* Rename get_env to get_xdg_env and clarify docstring.Julian Mehne2018-01-23
|
* Store settings in alot.rc.spec.Julian Mehne2018-01-21
| | | | | - allows users to use $XDG_CONFIG_HOME, as well - stores information in single places.
* Fix empty XDG_* environment variables.Julian Mehne2018-01-21
| | | | | | | | | | | | Use fallback, if an enviroment variable is unset *or* empty. Bug: - XDG_CONFIG_HOME='' alot Problem: Does not find the configuration file (among others), because os.environ.get('XDG_CONFIG_HOME', '~/.config') returns '', instead of '~/.config'.
* De-duplicate code with helper function.Julian Mehne2018-01-21
|
* Use any() instead of a for loop with a break statementLucas Hoffmann2018-01-09
|
* Move code out of with blockLucas Hoffmann2018-01-08
| | | | | The code doesn't need the context manager to be active, hence it can run outside of the with block.
* Use message of test assert function instead of print()Lucas Hoffmann2018-01-08
| | | | | This makes it possible to silence the test output with normal unittest settings (e.g. command line parameters).
* Log unknown settings in configuration and theme files.Julian Mehne2018-01-08
|
* Fix typos in tests.Julian Mehne2018-01-07
|
* Allow regex special characters in tagstrings.Julian Mehne2017-12-02
| | | | | | | | | | | | | | | Fixes the following crashes: 1. tag completion with regex special chars :search tag:[<tab> 2. Changing tag representation of an (existing) tag with regex special chars: [tags] [[my**tag]] normal = '','', 'white','light red', 'white','#d66' 3. Contact completion with regex special chars and no external command: To:**foo<tab>
* add test for argparse validatorPatrick Totzke2017-11-08
|
* tests/commands/utils: Add encrypt to self testsRuben Pollan2017-09-26
|
* tests/commands/utils: Add tests for alot/commands/utils.pyDylan Baker2017-09-25
|
* db/message: Try to use the 'Sender' header if the 'From' header is nullDylan Baker2017-09-06
| | | | This makes drafts display correctly.
* db/message: Don't set sender to ''Dylan Baker2017-09-06
| | | | | | | If the message doesn't have a sender, try to come up with one. If the message has the draft tag we known that the user is the sender, just use the default account as the from if we can't find one another way. If it doesn't have the draft tag just set the sending to 'Unknown'.
* tests/db/message: Add some tests for the message moduleDylan Baker2017-09-06
| | | | | These are just enough to look at the bug that will be fixed in the patches that follow.
* account: Fix Address comparison to b'' and u''Dylan Baker2017-09-06
| | | | | | | | | | | This uses a try/except because comparing an address to an empty string should be a fairly uncommon event and try/except will be faster than `if '@' not in other` in the case where '@' is in other. This stops alot from crashing if there is no 'From' header in the email. Outlook generates drafts without a 'From' header. Fixes #1050
* tests/account: Add test for comparing to empty stringDylan Baker2017-09-06
|
* Merge pull request #1108 from dcbaker/wip/fix-1107Patrick Totzke2017-08-30
|\ | | | | Handle servers that treat the user segment of an address as case insensitive
| * Use new Address classDylan Baker2017-08-28
| | | | | | | | | | | | | | This just wries the new Address class into alot for use, and fixes up a few places where such fixups are needed. Fixes #1107
| * account: Add an Address classDylan Baker2017-08-28
| | | | | | | | | | This class will encapsulate the logic of comparing email addresses and the rules of handling when capitalization is allowed and when it's not.
| * tests/settings/manager: Add test for case insensitivityDylan Baker2017-08-28
| | | | | | | | This currently fails as there is not way to toggle case sensitivity
* | Merge pull request #1136 from dcbaker/submit/more-db-utils-testsDylan Baker2017-08-30
|\ \ | |/ |/| more tests + cleanups
| * tests/db/utils: Add tests for message_from_stringDylan Baker2017-08-28
| |
| * tests/db/utils: Add tests for extract_body functionDylan Baker2017-08-28
| | | | | | | | | | | | there are probably still some corners with mailcap handling (parameters like copiousoutput) that are untested, but this covers a large swath of the functionality.
| * db/utils: Don't mark signature valid if there is no key to verifyDylan Baker2017-08-23
| |
| * tests/db/utils: Add some more coverage to add_signature_headersDylan Baker2017-08-23
| | | | | | | | | | There are a couple of pieces of this function that aren't covered, including a bug. yay bugs.
* | commands/globals: Only set stdin to a pipe if there is dataDylan Baker2017-08-23
| | | | | | | | | | | | | | | | | | | | Otherwise the editor will crash. I can't figure out for the life of me to test this. I thought that I would be able to do something like detect if stdin is a tty or something else, but that doesn't seem to work. Fixes #1137
* | tests/commands/globals: Add tests for stdin handlingDylan Baker2017-08-23
| |
* | tests/commands/global: Fix testsDylan Baker2017-08-23
| | | | | | | | | | These tests were wrong they would always pass, even if the code underneath was broken. With this fix they actually work.
* | Merge pull request #1135 from dcbaker/submit/external-command-testsDylan Baker2017-08-23
|\ \ | | | | | | Submit/external command tests