Take into account python types not just Yaml strings

* Install a smaller and with less dependencies package when testing the `pkg` state.
* Since salt is now able to pass real types and not just yaml, take that into account.

Refs the changes from #8289.