testing: add NewCharm function

This will allow tests to more easily create custom charms for testing purposes.