def element(request): """Return an element with an embedded category created via the Moztrap API, and automatically delete them after the test.""" mozwebqa = request.getfuncargvalue("mozwebqa") credentials = mozwebqa.credentials["default"] request.element = MockElement() api = MoztrapAPI(credentials["api_user"], credentials["api_key"], mozwebqa.base_url) api.create_element(request.element) return request.element
def element(request): """Return an element with an embedded category created via the Moztrap API, and automatically delete them after the test.""" mozwebqa = request.getfuncargvalue('mozwebqa') credentials = mozwebqa.credentials['default'] request.element = MockElement() api = MoztrapAPI(credentials['api_user'], credentials['api_key'], mozwebqa.base_url) api.create_element(request.element) return request.element
def element(request): """Return an element with an embedded category created via the Moztrap API, and automatically delete them after the test.""" mozwebqa = request.getfuncargvalue('mozwebqa') credentials = mozwebqa.credentials['default'] request.element = MockElement() api = MoztrapAPI(credentials['api_user'], credentials['api_key'], mozwebqa.base_url) api.create_element(request.element) # The element and category cannot be deleted via the API at this point, likely because they # are still connected to something. This will be addressed in a future pull. return request.element