def test_product_is_obsolete(): ok_(product_is_obsolete('firefox', '3.6')) ok_(product_is_obsolete('firefox', '32')) ok_(product_is_obsolete('firefox-esr', '17.0')) ok_(product_is_obsolete('thunderbird', '30')) ok_(product_is_obsolete('seamonkey', '2.0')) ok_(product_is_obsolete('seamonkey', '2.19')) ok_(product_is_obsolete('other-things', '3000')) ok_(not product_is_obsolete('firefox', '33.0.2')) ok_(not product_is_obsolete('firefox', '34.0')) ok_(not product_is_obsolete('firefox-esr', '31.0')) ok_(not product_is_obsolete('thunderbird', '31')) ok_(not product_is_obsolete('seamonkey', '2.30'))
def test_product_is_obsolete(): from product_details import product_details with patch.object(product_details, "firefox_versions", {"LATEST_FIREFOX_VERSION": "33.0", "FIREFOX_ESR": "31.2.0"}): with patch.object(product_details, "thunderbird_versions", {"LATEST_THUNDERBIRD_VERSION": "31.2.0"}): assert product_is_obsolete("firefox", "3.6") assert product_is_obsolete("firefox", "32") assert product_is_obsolete("firefox-esr", "17.0") assert product_is_obsolete("thunderbird", "30") assert product_is_obsolete("seamonkey", "2.0") assert product_is_obsolete("seamonkey", "2.19") assert product_is_obsolete("other-things", "3000") assert not product_is_obsolete("firefox", "33.0.2") assert not product_is_obsolete("firefox", "34.0") assert not product_is_obsolete("firefox-esr", "31.0") assert not product_is_obsolete("thunderbird", "31") assert not product_is_obsolete("seamonkey", "2.30")
def test_product_is_obsolete(): from product_details import product_details with patch.object(product_details, 'firefox_versions', { 'LATEST_FIREFOX_VERSION': '33.0', 'FIREFOX_ESR': '31.2.0' }): with patch.object(product_details, 'thunderbird_versions', {'LATEST_THUNDERBIRD_VERSION': '31.2.0'}): assert product_is_obsolete('firefox', '3.6') assert product_is_obsolete('firefox', '32') assert product_is_obsolete('firefox-esr', '17.0') assert product_is_obsolete('thunderbird', '30') assert product_is_obsolete('seamonkey', '2.0') assert product_is_obsolete('seamonkey', '2.19') assert product_is_obsolete('other-things', '3000') assert not product_is_obsolete('firefox', '33.0.2') assert not product_is_obsolete('firefox', '34.0') assert not product_is_obsolete('firefox-esr', '31.0') assert not product_is_obsolete('thunderbird', '31') assert not product_is_obsolete('seamonkey', '2.30')