Commit Graph

7 Commits

Author SHA1 Message Date
introt
2f50c747fb Add getNoteTags, updateNoteTags and updateNote
getNoteTags returns [str ...] of tags for a given note (note: int)

updateNoteTags removes the existing tags and sets new tags

updateNote combines the old updateNoteFields and the new updateNoteTags

Closes #369
2022-12-30 13:13:31 +02:00
oakkitten
8f1a2cc5fd Convert all tests to pytest
Previously, tests were run against Anki launched by user.

Now,
 * most tests run against isolated Anki in current process;
 * tests in `test_server.py` launch another Anki in a separate process
   and run a few commands to test the server;
 * nearly all tests were preserved in the sense that
   what was being tested is tested still.
   A few tests in `test_graphical.py` are skipped due to
   a problem with the method tests, see the comments;
 * tests can be run:
   * In a single profile, using --no-tear-down-profile-after-each-test;
   * In a single app instance, but with the profile being torn down
     after each test--default;
   * In separate processes, using --forked.
2022-04-11 02:26:44 +01:00
Kirill Salnikov
b8a7151ed0
Fix handling of errors in several methods (#238)
* Fix error message in updateNoteFields method

* Fix error handling in cardsInfo, notesInfo methods

* Add more tests for updateNoteFields, notesInfo

* Fix error handling in several methods

Also fixed obvious bugs in replaceTags and replaceTagsInAllNotes
methods.

* Add more tests for cards methods

* Add more tests for notes methods

* Update documentation on cards methods
2021-03-04 20:06:25 -08:00
a8273d0e38 Fix tests 2021-01-18 21:03:27 -08:00
Mikhail Pontus
47f9db35bd Introduce note deletion functionality 2019-02-26 20:28:36 +03:00
95ab8164cd updating note and deck tests 2018-05-08 18:47:45 -07:00
ba42cedf1a unit tests for notes 2018-05-08 15:13:49 -07:00