Hello. I am finally diving into the world of testing in my Plone add-ons so that I can begin to embrace the TDD approach to development.
I have created an add-on product that automatically creates translations when English content is modified, and I wanted to write some tests to validate the event handlers are doing what they should. I have been able to verify manually, but I thought it would provide a great simple opportunity to get into the testing mechanisms available in Plone.
My test case is available at: https://pastebin.com/vsbk81cV
When I run it, `bin/test -s my.translations -t TestTranslationSync -D, I find that self is an empty Plone site, so staging the portal must be what’s getting me.
I thought it would attach to the main site, but my question is: how do I tell it to attach to a particular site rather than a skeletal mock version? Is that even possible, or am I missing the whole point?
Thank you for any insight that you might provide.