You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Because of code like jwks = JWKS.fromurl(url) in the __init__(), it is impossible to import modules without them trying to connect to AWS Cognito at import time. This can cause a variety of problems, e.g. - unable to run unit tests without an Internet connection.
The text was updated successfully, but these errors were encountered:
Hi @jordan-dimov I was following this issue as I am dealing with edge devices and this is definitely an issue at the moment.
Did you close because you found a workaround?
If so, could you share?
@Minipada Oh, good to know it's not just me. I thought maybe I wasn't using it correctly. Ended up creating a fake Cognito class just for my unit tests, and switching between those with an environment variable. Happy to re-open this though.
I've faced with the same issue trying to write unittests using moto to fake Cognito resources. And in my case there is no straightforward way to pre-configure environment variable, since I create AWS Cognito resources using fixtures (pytest). Any good ideas how to overcome this?
Because of code like
jwks = JWKS.fromurl(url)
in the__init__()
, it is impossible to import modules without them trying to connect to AWS Cognito at import time. This can cause a variety of problems, e.g. - unable to run unit tests without an Internet connection.The text was updated successfully, but these errors were encountered: