summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* update tests for SettingsManagerPatrick Totzke2018-06-21
| | | | | | | - SettingsManagers is now instantiated without config paths and instead `read_[notmuch]config` is called separately - test_no_user_setting_* are removed, because we do not need to test what config path SettingsManager uses anymore (this is now explicit)
* Remove old __future__ importsLucas Hoffmann2018-06-19
| | | | They are not needed for python >= 3.0.
* Fix bad refactor of a testDylan Baker2018-05-07
|
* Fix some formatting requests for @luccDylan Baker2018-04-24
|
* Revert "Extract some context managers for patch objects."Dylan Baker2018-04-24
| | | | | | | | This reverts commit d01d2e51da45dd87f0abf98b8a856f3b3de69153. I don't think that this patch really improved readability that much. The right solution is to split ComposeCommand.apply so we don't need so many mocks.
* Wrap long statements on open-bracket syntax.Ben Finney2018-04-23
|
* Refactor some long statements to allow shorter lines.Ben Finney2018-04-23
|
* Rename some test functions to have shorter names.Ben Finney2018-04-23
|
* Extract some context managers for patch objects.Ben Finney2018-04-23
| | | | This allows writing less-nested statements.
* db/utils: decoded_headers will be passed str not bytesDylan Baker2018-03-12
| | | | | | | I had made the assumption early on that this would get bytes, but when I added `assert isinstance(header, bytes)` alot would crash on startup, changing `bytes` to `str` fixed that. I noticed this when trying to fix the warning generated in the logging call.
* drop bytes support from AddressDylan Baker2018-03-06
| | | | | | We don't want to be comparing bytes anyway, the decode would use utf-8, and that isn't right. Instead make the caller convert to a str of Address first.
* 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