port resource tests to pytest