aboutsummaryrefslogtreecommitdiff
path: root/ihatemoney/tests
AgeCommit message (Collapse)AuthorFilesLines
2020-02-20Align tables in statistics (#535)Glandos1-5/+25
* Align tables in statistics The table in sidebar is now aligned with the one in content, to avoid redundant informations. All tables are back to normal on small devices. * fix test * run black on tests
2020-02-17Use SQL statement for summing up weightsDavidRThrashJr1-0/+64
* Update models: Bill.pay_each() * Import sql func * reformatted using black * Added ModelsTestCase.test_bill_pay_each() in order to test the SQL query change within pay_each. Had to add Project.ProjectQuery.get_by_name() for the test.
2020-02-08Statistics view #323James Leong1-14/+4
Remove header and table column of 'Balance' in statistics view
2020-01-13Import previously exported json data (#518)Nicolas Vanvyve1-0/+209
Fix #417 * New tab upload * Extract data from JSON * Add users * Black format * Try to add bill * Import bills * Add french translation msg * Black reformat missing * Deactivated users are supported * Test import * Remove temp file in upload_json() * Incomplete tests * tests import * Update ihatemoney/translations/fr/LC_MESSAGES/messages.po Co-Authored-By: Rémy HUBSCHER <hubscher.remy@gmail.com> * Remove useless variable and check json format * Use String.IO and test for wrong json * Remove coma Co-authored-by: Rémy HUBSCHER <hubscher.remy@gmail.com>
2019-12-29Fixed typos in tests.py (#521)John-Michael Reed1-4/+4
2019-10-25Token support (#504)José Antonio de la Torre1-0/+36
Added API support to generate authentication tokens, at `/api/projects/:id/token`
2019-10-19typoJosé Antonio de la Torre1-1/+1
2019-10-19Added testJosé Antonio de la Torre1-0/+40
2019-10-14Use black to refomat the files.Alexis M1-679/+921
2019-10-11Remove support for python2.Alexis M1-16/+11
In the same move : - use a setup.cfg file for packaging - remove the use of six
2019-10-03fix unit testsLeo Mouyna1-4/+14
2019-09-27Trim member usernames. Fixes #353Alexis Métaireau1-1/+10
2019-09-24Fix #434 Use the debts lib to solve settlements.Alexis M1-8/+13
2019-09-06Update requirements.txtAlexis M1-1/+1
2019-09-06bill list: add placeholder and disable add bill when no membersBrice Maron1-1/+27
2019-08-26Move export form to linksBrice Maron1-33/+7
2019-01-03Do not allow negative weights on users (Fixes #362) (#366)Alexis Metaireau1-0/+12
2019-01-03Provide basic math operations on bills (#413)Byron Ullauri1-0/+81
* allow basic math ops in amount field for bills form * docs: changing compile-translations to build-translations
2018-12-26Resolve "Update API project list" (#409)Byron Ullauri1-17/+8
* refactoring models _to_serialize property * updated project api members list * addressing flake8: line too long
2018-12-25Add CORS to the API. Fix #404 (#407)Alexis Metaireau1-0/+10
2018-12-25Add bill.creation_date field (#327)Lucas Verney1-3/+30
2018-09-03Add a ihatemoney delete-project command. (#375)Alexis Metaireau1-1/+11
2018-08-05Remove strict_slashes for /Glandos1-0/+6
I don't know why, but on my setup (nginx + uwsgi), the `strict_slashes` (default to `True`) was causing an infinite loop. I think it could be safely removed for this route only.
2018-02-07Add statistics support to APIJocelyn Delalande1-0/+34
2018-02-07Change statistics data structureJocelyn Delalande1-12/+12
Clearer data structure, and simpler template This commit has a side effect: sidebar now hides disabled members. IMHO, the disabled members should either be hidden or shown consistently between sidebar and central table. Previous status was: shown in sidebar (if balance ≠ 0) and hidden in central table.
2018-01-25API: Migrate from flask-rest to flask-restful (#315)0livd1-7/+7
The flask-rest custom json encoder is still needed and thus was added to ihatemoney's utils. Closes #298
2018-01-07manage commands testing (#313)JocelynDelalande1-0/+27
* Rename manage.ConfigTemplate → manage.GenerateConfig To be consistent with the CLI name: `generate-config`. * Add tests for manage.py commands * Run tests from pip-installed package To be able to detect packaging-related issues on test runs. refs #305
2017-12-29Allow to disable/enable member via API (#301)JocelynDelalande1-0/+24
Disable was already (kind-of) possible via API via DELETE, but not re-enabling. Kudos to @almet for helping me fixing that damn BooleanField :-)
2017-12-27Fix tests layout so that API tests are not ran twiceJocelyn Delalande1-6/+5
Bad inheritance was causing APITestsCase tests to be ran twice.
2017-12-27Add tests for #294Alexis Métaireau1-1/+7
2017-12-27 Fix PUT api/project/:code/members/:id (#297)JocelynDelalande1-2/+11
* Fix PUT api/project/:code/members/:id Before that commit, every PUT *must* change the name of the members, so that was : - no idempotence, - no ability to change only weight fix #295 * Remove redundant comment
2017-12-22Remove API password (#290)JocelynDelalande1-6/+16
* Remove the password from API GET responses While keeping it for POST/PUT. fix #289 * Add a test to check password change via API
2017-12-21Use hashed passwords for projects (#286)0livd1-11/+15
- Remove all occurences of clear text project passwords. - Migrate the database to hash the previously stored passwords. Closes #232
2017-12-15Use token based auth in invitation e-mails (#280)0livd1-0/+23
* Use token based auth in invitation e-mails Invitation e-mails no longer contain the clear text project password * Skip invite page after project creation - Replace ``The project identifier is demo, remember it!`` by ``Invite other people to join this project!`` (linking to the invite page) - Encourage users to share the project password via other communication means in the reminder email
2017-11-11Fix some typos using codespell (#285)Alexandre Avenel1-2/+2
2017-10-26Use token based auth to reset passwords (#269)0livd1-0/+24
Send a mail containing a password reset token link instead of sending a clear text password. Ref #232
2017-10-23Make authentication logic simpler and safer (#270)0livd1-2/+2
* Fixed exposed password in session The project password was set in clear text in the session cookie. The cookie payload is only base64 encoded so it must not be used to store private information. The password is simply replaced by a boolean. * Simplify authentication logic
2017-09-04Enhance the dashboard. (#262)0livd1-3/+28
* Update to a more flexible admin authentication * Admin can now access any project * Add delete and edit options in the dashboard * Add a link to the dashboard in the nav bar This is a rework of the changes proposed by @Olivd, so they can apply on top of the latest master without trouble. All credit goes to him for the code.
2017-08-21Add a statistics tab (#257)0livd1-0/+62
2017-08-20Protect admin endpoints against brute force attacks (#249)0livd1-0/+23
* Protect admin endpoints against brute force attacks Add a throttling mechanism to prevent a client brute forcing the authentication form, based on its ip address Closes #245 * Reset attempt counters if they get memory hungry
2017-08-06Fix #248: Database creation issue (#254)0livd1-1/+1
In flask's development server, the route handlers run in a different thread than the main thread thus an in-memory database created in the main thread cannot be acccessed by the route handlers. Switching the default database location to a temporary file solves the isssue. See full explanation here: https://gehrcke.de/2015/05/in-memory-sqlite-database-and-flask-a-threading-trap/
2017-07-09Revert configuration tests deletion (#250)0livd1-4/+26
Some supernatural power erased the configuration tests, they're now back !
2017-07-07Absolute imports & some other improvements (#243)Alexis Metaireau4-0/+1193
* Use absolute imports and rename package to ihatemoney * Add a ihatemoney command * Factorize application creation logic * Refactor the tests * Update the wsgi.py module with the new create_app() function * Fix some styling thanks to Flake8. * Automate Flake8 check in the CI.