# passing dictionary arguments to hacking/test-module

**URL:** <https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919>\
**Category:** Ansible Developer\
**Tags:** aws\
**Created:** [March 18, 2016, 2:19pm UTC](https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919 "2016-03-18T14:19:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Michael\_Baydoun](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Michael\_Baydoun](https://forum.ansible.com/u/Michael_Baydoun)\
**Post date:** [March 18, 2016, 2:19pm UTC](https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919/1 "2016-03-18T14:19:55Z")

</div>

Is it possible to pass a dictionary argument to test-module, and if so, what does it look like?  
Need to pass a couple of aws tags to a module for testing

hacking/test-module -m mymodule.py -a “key1=val1 key2=val2 dict1=???”

---

<div class="post-metadata">

**Author:** ![Michael\_Baydoun](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Michael\_Baydoun](https://forum.ansible.com/u/Michael_Baydoun)\
**Post date:** [March 23, 2016, 6:06pm UTC](https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919/2 "2016-03-23T18:06:56Z")

</div>

In case anyone runs across this, the solution was to eliminate all white space in the dictionary. See dict1 example below.

hacking/test-module -m your\_module.py -a “key1=val1 key2=val2 dict1={‘foo’:‘bar’}”

---

<div class="post-metadata">

**Author:** ![Conor\_Schaefer](https://avatars.discourse-cdn.com/v4/letter/c/c2a13f/32.png) [@Conor\_Schaefer](https://forum.ansible.com/u/Conor_Schaefer)\
**Post date:** [March 23, 2016, 6:23pm UTC](https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919/3 "2016-03-23T18:23:41Z")

</div>

Thanks for following up with what worked for you!

---

<div class="post-metadata">

**Author:** ![Michael\_Baydoun](https://avatars.discourse-cdn.com/v4/letter/m/aeb1de/32.png) [@Michael\_Baydoun](https://forum.ansible.com/u/Michael_Baydoun)\
**Post date:** [March 23, 2016, 6:38pm UTC](https://forum.ansible.com/t/passing-dictionary-arguments-to-hacking-test-module/20919/4 "2016-03-23T18:38:00Z")

</div>

My pleasure!
