Commit graph

15 commits

Author SHA1 Message Date
Éloi Rivard
857ca2d5b0
tests: speed up unit tests (#1215)
Adds two configuration parameters that are passed to
generate_password_hash:

- PASSWORD_HASH_METHOD
- PASSWORD_HASH_SALT_LENGTH

The unit tests use high-speed low-security values and
gain 50% speed.
2023-08-13 00:04:06 +02:00
Éloi Rivard
8d4584d660 feat: project RSS feed. 2023-07-28 15:22:55 +02:00
Glandos
d477b41d9a add test case 2023-01-29 23:03:14 +01:00
Glandos
923a7c41c1 black formatting, since last black changed 2023-01-28 17:06:33 +01:00
Glandos
78af70b2c1 Add url from request 2022-07-16 23:29:35 +02:00
Youe Graillot
747824a298
CSV bills import (cospend compatible) (#951)
* proper import form (fix messy errors)
* csv compatible import
* cospend compatible import
* localization (best effort)
* refactoring
* revert localization (best effort)
* import return 400 on error
* fix Person.query.get_by_ids calls
* Bill explicit init parameters
* fix tests
* refacto tests with self.get_project
* separate import tests
* fix tests
* csv import test case
* fix import csv parsing
* revert DestructiveActionProjectForm renaming
* fix csv import test
* fix error redirection on import
* fix lint
* import file input type hint
* various fixes from review

Co-authored-by: Youe Graillot <youe.graillot@gmail.com>
2021-12-22 00:00:34 +01:00
68552a6034
Allow connecting to upper-case project IDs. (#934)
Fix #933.
2021-11-23 19:09:50 +01:00
Baptiste Jonglez
7fdb72cff8 tests: allow to choose project name independently from ID (no change by default) 2021-10-20 23:29:11 +02:00
Baptiste Jonglez
ff2a5cc147 Add API test cases related to currencies 2021-10-14 00:07:41 +02:00
2bcc41bdb3
Add optional support for a simple CAPTCHA. (#844)
* Add optional support for a simple CAPTCHA.
* formatting
* add test case
* Flake8

Co-authored-by: Glandos <bugs-github@antipoul.fr>
2021-10-11 17:39:24 +02:00
Baptiste Jonglez
6448d0d7df Move CurrencyConverter mocking to the base test class
This mock was already applied to all tests, because it was done statically
in the TestCurrencyConverter class definition.  But it was really not
clear that it's applied everywhere.

Moving this to the setUp() function makes it much clearer.

Also, remove useless redefinition in other tests.
2021-09-07 23:15:40 +02:00
Baptiste Jonglez
2e4bb0ec8c tests: ensure that /tmp/ihatemoney.db does not get overwritten
Most of the tests are using a separate database, but we have a few tests
that are loading default values and are writing to /tmp/ihatemoney.db.

This is annoying because it's also the database used for development:
running the test suite breaks the dev database.

To fix this, always use a separate testing database to avoid interference.
2021-07-14 10:36:39 +02:00
Baptiste Jonglez
7ceb66f01b Enable CI builds with postgresql and mariadb 2021-07-10 00:39:54 +02:00
Glandos
07b86bc580
Rework currency switching (#661)
Co-authored-by: Alexis Métaireau <alexis@notmyidea.org>

Currency switching is both simpler and less powerful. This was done primarily for users, to have a clear and logical understanding, but the code is also simpler. The main change is that it is now forbidden to switch a project to "no currency" if bills don't share the same currency.

Also, tests assume that projects are created without currency, as in the web UI.
2021-07-06 21:51:32 +02:00
Miguel Victoria Villaquiran
18068d76ca
Simplify tests (#685)
Fix #501
2021-01-05 22:17:26 +01:00