def test_approve_addons_get_review_type(use_case): """Review type depends on the file and addon status. Use cases are quadruples taken from the "use_case" fixture above. """ addon, file1, _, review_type = use_case assert approve_addons.get_review_type(file1) == review_type
def test_approve_addons_get_review_type(use_case): """Review type depends on the file and addon status. Use cases are quadruples taken from the "use_case" fixture above. """ addon, file1, _, review_type = use_case assert approve_addons.get_review_type(file1) == review_type
def test_approve_addons_get_review_type_already_approved(): """The review type for a file that doesn't need approval is None.""" addon = addon_factory(status=amo.STATUS_PUBLIC) file_ = addon.versions.get().files.get() file_.update(status=amo.STATUS_PUBLIC) assert approve_addons.get_review_type(file_) is None
def test_approve_addons_get_review_type_already_approved(): """The review type for a file that doesn't need approval is None.""" addon = addon_factory(status=amo.STATUS_PUBLIC) file_ = addon.versions.get().files.get() file_.update(status=amo.STATUS_PUBLIC) assert approve_addons.get_review_type(file_) is None