Kevin Morris
abfd41f31e
change(fastapi): centralize HTTPException
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 23:23:27 -08:00
Kevin Morris
a747548254
Merge branch 'fix-navbar-spacing' into pu
2021-12-02 17:32:19 -08:00
Kevin Morris
e1bf6dd562
fix(fastapi): restore stripped whitespace in archdev-navbar
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-02 17:09:37 -08:00
Steven Guikal
42701514e7
fix(FastAPI): Use HTTPStatus instead of raw number
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-01 21:15:49 +00:00
Kevin Morris
0435c56a41
update test/README.md to be more aligned with the current state
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 12:27:14 -08:00
Kevin Morris
c09784d58f
fix(auth.auth_required): remove unused keyword arguments
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 11:56:44 -08:00
Kevin Morris
112837e0e9
fix(test_auth): cover mismatched referer situation
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 11:53:43 -08:00
Kevin Morris
043ac7fe92
fix(test_aurblup): use correct type hint for tmpdir
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:31 -08:00
Kevin Morris
fccd8b63d2
housekeep(fastapi): rewrite test_auth_routes with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
7ef3e34386
housekeep(fastapi): rewrite test_accounts_routes with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
de0f919077
housekeep(fastapi): rewrite test_ban with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:30 -08:00
Kevin Morris
eb396813a8
housekeep(fastapi): rewrite test_package with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:29 -08:00
Kevin Morris
5b14ad4065
housekeep(fastapi): rewrite test_user with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:33:28 -08:00
Kevin Morris
140f9b1fb2
housekeep(fastapi): rewrite test_package_dependency with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:23 -08:00
Kevin Morris
05bd6e9076
housekeep(fastapi): rewrite test_package_vote with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:22 -08:00
Kevin Morris
150c944758
housekeep(fastapi): rewrite test_package_group with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:22 -08:00
Kevin Morris
df530d8a73
housekeep(fastapi): rewrite test_package_source with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:22 -08:00
Kevin Morris
171b347dad
housekeep(fastapi): rewrite test_package_base with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:21 -08:00
Kevin Morris
93bc91cce2
housekeep(fastapi): rewrite test_tu_voteinfo with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:21 -08:00
Kevin Morris
ae72817950
housekeep(fastapi): rewrite test_routes with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:21 -08:00
Kevin Morris
ca25595022
housekeep(fastapi): rewrite test_sesion with fixtures
...
Also, added a new test function which tests the IntegrityError
exception.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:20 -08:00
Kevin Morris
a0e1a1641d
fix(fastapi): support UsersID and User columns in the Session model
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:20 -08:00
Kevin Morris
31a093ba06
housekeep(fastapi): rewrite test_package_relation with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:20 -08:00
Kevin Morris
14d80d756f
housekeep(fastapi): rewrite test_package_comaintainer with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:19 -08:00
Kevin Morris
ff3931e435
housekeep(fastapi): rewrite test_package_notification with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:19 -08:00
Kevin Morris
655b98d19e
housekeep(fastapi): rewrite test_package_license with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:19 -08:00
Kevin Morris
a082de5244
housekeep(fastapi): rewrite test_package_keyword with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:18 -08:00
Kevin Morris
b20ec9925a
housekeep(fastapi): rewrite test_ssh_pub_key with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:18 -08:00
Kevin Morris
91f6591141
housekeep(fastapi): rewrite test_accepted_term with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:18 -08:00
Kevin Morris
d6cb3b9fac
housekeep(fastapi): rewrite test_auth with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:30:16 -08:00
Kevin Morris
735c5f57cb
housekeep(fastapi): rewrite test_package_blacklist
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:28:40 -08:00
Kevin Morris
adafa6ebc1
housekeep(fastapi): rewrite test_package_request with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:28:39 -08:00
Kevin Morris
012dd24fd8
housekeep(fastapi): rewrite test_tu_vote with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:28:39 -08:00
Kevin Morris
604df50b88
housekeep(fastapi): rewrite test_package_comment with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:28:39 -08:00
Kevin Morris
2fee6205a6
housekeep(fastapi): rewrite test_rpc with fixtures
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-12-01 00:28:36 -08:00
Kevin Morris
867825491b
Merge branch 'fix-improve-auth' into pu
2021-12-01 00:14:16 -08:00
Steven Guikal
0b30216229
fix(FastAPI): remove unnecessary arguments to auth_required
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-01 03:11:01 -05:00
Steven Guikal
429d8059e1
fix(FastAPI): remove login and redirect parameters from auth_required
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-01 02:57:23 -05:00
Steven Guikal
a10f8663fd
fix(FastAPI): reorganize credential checkin into dedicated file
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-12-01 02:03:02 -05:00
Steven Guikal
125b244f44
fix(FastAPI): use account type vars instead of strings
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-11-30 16:33:34 -05:00
Steven Guikal
ecbab8546b
fix(FastAPI): access AccountType ID directly
...
Signed-off-by: Steven Guikal <void@fluix.one>
2021-11-30 16:33:34 -05:00
Kevin Morris
a6ac5f0dbf
fix(rpc): fix ordering of related records
...
They were being ordered by IDs; they should be ordered by Names.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-30 16:33:34 -05:00
Kevin Morris
274682f040
Merge branch 'fix-rpc-ordering' into pu
2021-11-29 19:57:45 -08:00
Kevin Morris
001e86317f
fix(rpc): fix ordering of related records
...
They were being ordered by IDs; they should be ordered by Names.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 19:44:18 -08:00
Kevin Morris
9bfe2b07ba
fix(fastapi): render Logged-in as page on authenticated /login
...
This was missed during the initial porting of the /login route.
Modifications:
-------------
- A form is now used for the [Logout] link and some css was
needed to deal with positioning.
Closes #186
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 19:40:55 -08:00
Kevin Morris
fd8d23a379
fix(fastapi): fix new Logout nav item css
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 19:04:55 -08:00
Kevin Morris
69eb17cb0d
change(fastapi): remove the GET /logout route; replaced with POST
...
Had to add some additional CSS in to style a form button the same
as <a> links are styled.
Closes #188
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 16:52:10 -08:00
Kevin Morris
44f2366675
fix: remove TODO comments and noop tests from test_notify
...
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 16:20:36 -08:00
Kevin Morris
436d742017
fix(fastapi): use CRED_TU_LIST_VOTES for "Trusted User" navigation item
...
Closes #189
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-29 14:08:00 -08:00
Kevin Morris
4426c639ce
fix(logging): remove test
logger definition
...
Like the `aurweb` logger definiton was previously, the `test`
logger is being redundant with the root logger. Use root for
all aurweb-local logging.
Signed-off-by: Kevin Morris <kevr@0cost.org>
2021-11-28 19:55:12 -08:00