summaryrefslogtreecommitdiff
path: root/tests
Commit message (Collapse)AuthorAge
* settings: Add a reload methodDylan Baker2017-07-10
| | | | | | | | | | | This patch does a bit of refactoring to the Settings class for it's setup, and adds a reload method. The refactoring encapsulates the handling of NoneType for the read_*config methods, and reworks the constructor just a bit so that it doesn't rely on calling methods to create instance variables. The end result is slightly cleaner, and will be useful for adding a reload command to alot itself.
* tests: fix typo in module name envelop -> envelopeDylan Baker2017-07-10
|
* tests: rename command/envelope_tests to command/envelope_testDylan Baker2017-07-10
| | | | makes pylint happier to run tests, doesn't affect main pytest.
* tests: rename settings/manager.py -> settings/manager_test.pyDylan Baker2017-07-10
| | | | Or it wont be picked up by some test discovery methods.
* 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 tests for addressbook.AddressBookLucas Hoffmann2017-06-23
|
* determine_sender: Add more testsLucas Hoffmann2017-06-23
|
* Use account instead of realname to break loopsLucas Hoffmann2017-06-23
| | | | | | | | This fixes a bug in determine_sender where an account that did match but did not have a realname set was "not found" in case force_realname was set. Helped-By: Pol Van Aubel <dev@polvanaubel.com>
* Add test for force_realname settingsLucas Hoffmann2017-06-23
| | | | The second test case exemplifies a bug in determine_sender.
* Remember matched account explicitlyLucas Hoffmann2017-06-22
| | | | | Otherwise the next account in the for loop might have been returned if the account was found to match with its last alias.
* determine_sender: test if account matches addressLucas Hoffmann2017-06-22
| | | | | This test case exemplifies a bug in determine_sender. The address is matched correctly but the wrong account is associated with it.
* Add first test for commands.thread.determine_senderLucas Hoffmann2017-06-22
|
* 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
|
* Add crypto tests that don't need a keyringLucas Hoffmann2017-06-21
|
* Clean up temp file after testLucas Hoffmann2017-06-08
|
* Correct membership testLucas Hoffmann2017-06-08
|
* Split up test case to see expected failureLucas Hoffmann2017-06-08
|
* Add tests for addressbook classesLucas Hoffmann2017-06-08
|
* Merge pull request #1061 from lucc/tests/settings-managerLucas Hoffmann2017-06-08
|\ | | | | add some first tests for settings.manager.SettingsManager
| * Add simple tests for settings methods for notmuch settingsLucas Hoffmann2017-06-06
| |
* | tests: Add some basic test for AccountDylan Baker2017-06-07
|/ | | | | This doesn't cover the actually complex part of the of the module, but it's a few basic tests.
* tests/helper_test.py: Don't use GNU %P, which breaks non glibc platformsDylan Baker2017-05-30
| | | | | | Instead us %p, which differs only in the case of the am/pm. Fixes #1048
* Move Popen.communicate call out of try-except blockLucas Hoffmann2017-02-19
| | | | | The OSError that is being caught should only be raised by the Popen constructor: https://docs.python.org/3/library/subprocess.html#exceptions
* Add tests for OSError handling in alot.helper.call_cmdLucas Hoffmann2017-02-18
|
* tests: Instruct pylint to ignore a large swath of warningsDylan Baker2017-02-08
| | | | | | | | | There are a number of things pylint warns on that absolutely make sense to fix in production code, but for unittests they either don't matter (like naming variables "foo"), can't be fixed (TestCase methods that don't use self because they use a mock assert), or the descriptive names violate PEP8. These are annoying and create noise, so tell pylint to ignore them.
* alot/helper: simplify call_cmd and fix testDylan Baker2017-02-07
| | | | | This both fixes a test that failed (since stderr wasn't being set) and simplifies the function to only have one path that uses a ternary.
* tests/helper_test.py: Add tests for call_cmdDylan Baker2017-02-07
| | | | This even finds a bug!
* commands/init_test: Basic tests for registerCommandDylan Baker2017-01-31
|
* Add tests for commands/envelopeDylan Baker2017-01-31
|
* Merge pull request #1009 from dcbaker/pr/remove_cmpPatrick Totzke2017-01-30
|\ | | | | Remove remaining uses of cmp
| * Replace cmp with rich comparisonsDylan Baker2017-01-27
| | | | | | | | | | | | This is both a performance issue (since cmp is slower than rich comparisons), and a python3 issue since cmp (and __cmp__) are gone in python 3.
| * tests/widgets/globals: Add test for sorting of TagWidgetsDylan Baker2017-01-27
| |
* | Merge pull request #1014 from lucc/tests/silencePatrick Totzke2017-01-29
|\ \ | | | | | | Silence argparse validator test
| * | Silence argparse validator testLucas Hoffmann2017-01-28
| |/
* / helper: Use kibi and mibibytes instead of kilo and megabytesDylan Baker2017-01-27
|/ | | | | | | | | | | | Technically a kilobyte (and it's derivatives like megabytes and gigabytes) are defined as powers of 1000, while a kibibyte (and it's derivatives like mibibytes and gibibytes) are defined as powers of 1024. This patch fixes incorrect language and formatting in the humanize_size function which defined a kilobyte as 1024. See this wikipedia article for more information: https://en.wikipedia.org/wiki/Kibibyte
* Merge pull request #1000 from dcbaker/pr/argument-validatorLucas Hoffmann2017-01-27
|\ | | | | argparse validators
| * alot/utils/argparse: Add a new argparse validators infrastructureDylan Baker2017-01-25
| | | | | | | | | | | | | | | | | | | | | | | | | | This adds a new argparse.Action class validates input using a new keyword argument that takes a validator function. This will allow us to replace the use the type keyword as a validator, which is both more correct, and frees up the type keyword to do what it's actually meant to do, convert the input from one type to another. It also adds 3 new validator functions that will be enabled in the next commit. One that checks for a required file, one that checks for an optional directory, and one that looks for a required file, fifo, or block special device (/dev/null).
| * move alot/settings/checks to alot/utils/configobjDylan Baker2017-01-25
| | | | | | | | This is just more reorganization.
* | Fix expected failures in compltion testLucas Hoffmann2017-01-25
| |
* | Add tests for ReplyCommand.clear_my_addressLucas Hoffmann2017-01-25
| |
* | Fix test for ensure_unique_address with new quotingLucas Hoffmann2017-01-25
| |
* | Fix some quantify code commentsLucas Hoffmann2017-01-25
| |
* | Add test for address book completionLucas Hoffmann2017-01-25
| |
* | Merge pull request #928 from dcbaker/wip/helper-unit-testsPatrick Totzke2017-01-25
|\ \ | | | | | | unittests for helper module.