:question: Question about writing unit tests for a...
# plugins
p
Question about writing unit tests for a async methods of a plugin. I’m getting this
TypeError: argument of type 'type' is not iterable
and I’m not sure why. I believe the test needs to be async as well? Full error is below and my plugin function snippet and unit test in the thread/
1
plugin function under test.py
unit test.py
c
Python trips you up.. as these `
Copy code
(EnvironmentVarsRequest),
are just parenthesis around a single value, and is not a tuple unless you add a trailing comma (or more elements)
Copy code
(EnvironmentVarsRequest,),
same for
Copy code
(Process),
p
Thanks Andreas. I’m silent because I’m OOO. I’ll get back to you soon.
👍 1
That was it. Tests are working as expected now 👍
I feel like a noob but at least I’m unblocked
c
Great. Thanks for the feedback.