def test_version_status(): addon = addon_factory(file_kw={'status': amo.STATUS_APPROVED}) version = addon.current_version assert 'Approved' == (jinja_helpers.version_status(addon, version)) version.file = File(status=amo.STATUS_AWAITING_REVIEW) assert 'Awaiting Review' == (jinja_helpers.version_status(addon, version))
def test_version_status(): addon = Addon() version = Version() version.all_files = [File(status=amo.STATUS_PUBLIC), File(status=amo.STATUS_AWAITING_REVIEW)] assert u'Approved,Awaiting Review' == ( jinja_helpers.version_status(addon, version)) version.all_files = [File(status=amo.STATUS_AWAITING_REVIEW)] assert u'Awaiting Review' == jinja_helpers.version_status(addon, version)
def test_version_status(): addon = Addon() version = Version() version.all_files = [File(status=amo.STATUS_APPROVED), File(status=amo.STATUS_AWAITING_REVIEW)] assert u'Approved,Awaiting Review' == ( jinja_helpers.version_status(addon, version)) version.all_files = [File(status=amo.STATUS_AWAITING_REVIEW)] assert u'Awaiting Review' == jinja_helpers.version_status(addon, version)