Use setup_class/teardown_class in Declarative tests

Pytest will consider each Declarative test individually, running
setup/teardown for each one.
Move the setup and teardown to the class level.