make tests work again and simplify/conventionalize them

This makes tests work again and also simplifies them to the extent possible and makes them use a conventional structure and style like the more recent tests in the Add-on SDK.