testing python / ansible modules

Hi All,

I was wondering if anyone ever wrote tests for an ansible module ?

I’m trying to instantiate m = AnsibleModule(argument_spec=dict()) but it keeps failing with “Error: Module unable to decode valid JSON on stdin.”, before I can even call m.params = {} or something to give the instance some parameters to work with. To me it seems you’re currently unable to specify / override parameters passed to a AnsibleModule directly, is there something I can do to give AnsibleModule the correct context to find these parameters ?

Thanks!

Alex