fastapi-azure-auth icon indicating copy to clipboard operation
fastapi-azure-auth copied to clipboard

Improve tests

Open Bulga-xD opened this issue 3 years ago β€’ 10 comments
trafficstars

This PR is regarding only improving the UnitTests(adding some parametrized tests). Keep in mind behavior and the number of the tests are the same. Just removing not needed noise in the code.

Directly reject it if doesn't look reasonable to you.

Bulga-xD avatar Jul 02 '22 17:07 Bulga-xD

@JonasKs Please take a look here. This is so interesting for me :)

Bulga-xD avatar Jul 05 '22 15:07 Bulga-xD

I will go through it all tomorrow😊 Thank you for the PR!!

JonasKs avatar Jul 05 '22 15:07 JonasKs

I absolutely love this! If you do this out of the main branch (renaming the generate_obj function etc.) it would be awesome

JonasKs avatar Jul 06 '22 19:07 JonasKs

@JonasKs Should you rebase it or do I have to create a brand new MR?

Bulga-xD avatar Jul 08 '22 07:07 Bulga-xD

@kristiqntashev , you have to sync your main branch. See the GitHub documentation here.

You can then either rebase main into your improve_tests branch, or as you said, create a new branch from main. I'd rebase, but it can be a hassle if it is the first time. So do whatever you find easiest 😊

JonasKs avatar Jul 08 '22 10:07 JonasKs

Awesome 😊

I think, in general, the test suite for this package is a bit too repetitive. Right now the b2c folder and multi-tenant folder is more or less the same (except for which class is used). I think we could definitely make this into just one folder, and remove a good chunk of tests.. If we're to add a B2CSingleTenantAuthorizationBearer, this don't really scale. One code change would break 4 sets of equal tests.

I'm going on vacation tonight, so I'll probably not be able to really give a review or merge for a week or two. But I'll try to get back to you ASAP when I'm back home 😊

JonasKs avatar Jul 08 '22 13:07 JonasKs

I will do it next week quite busy this.

Bulga-xD avatar Jul 09 '22 08:07 Bulga-xD

No rush, thank you so much for contributing 😊

JonasKs avatar Jul 09 '22 08:07 JonasKs

Too much work I will finish this soon as possible.

Bulga-xD avatar Jul 18 '22 09:07 Bulga-xD

No rush!😊

JonasKs avatar Jul 18 '22 09:07 JonasKs

Closing for inactivity. Feel free to re-open.

JonasKs avatar Feb 02 '23 17:02 JonasKs