lnbits-legend/tests/core/views
dni ⚡ bda054415a
[FEAT] improve update_admin_settings (#1903)
* [FEAT] improve update_admin_settings

while working on the push notification pr i found it very hard just to update
2 settings inside the db, so i improved upon update_admin_settings.
now you just need to provide a dict with key/values you want to update inside db.

also debugging the endpoints for update_settings i found despite the type of `EditableSettings`
fastapi did in fact pass a dict.

* t

* use `EditableSettings` as param in update_settings

* fix settings model validation

we previously overrode the pydantic validation with our own method

* make `LnbitsSettings` a `BaseModel` and only add `BaseSettings` later

this allows us to instantiate `EditableSettings` without the environment values being loaded in

* add test

* forbid extra fields in update api

* fixup

* add test

* test datadir

* move UpdateSettings

* fix compat

* fixup webpush

---------

Co-authored-by: jacksn <jkranawetter05@gmail.com>
2023-09-12 10:59:32 +01:00
..
__init__.py [CHORE] remove redundant mocks (#1902) 2023-08-28 10:56:20 +01:00
test_admin_api.py [FEAT] improve update_admin_settings (#1903) 2023-09-12 10:59:32 +01:00
test_api.py [TEST] workflows, added 10s timeout to lncli subprocess and logging (#1910) 2023-08-30 11:01:32 +01:00
test_generic.py small followup to #1597 2023-04-03 17:54:55 +02:00
test_public_api.py remove lnaddress (#1525) 2023-02-20 09:08:23 +01:00