def test_version_check():
    """
    test the version checking and blacklisting functionality
    """

    ## current version against dev synapsePythonClient version file
    version_check(
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## should be higher than current version and return true
    assert version_check(
        current_version="999.999.999",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test out of date version
    assert not version_check(
        current_version="0.0.1",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test blacklisted version
    assert_raises(
        SystemExit,
        version_check,
        current_version="0.0.0",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test bad url
    assert not version_check(
        current_version="999.999.999",
        version_url=
        "http://dev-versions.synapse.sagebase.org/bad_filename_doesnt_exist")
def test_version_check():
    # Check current version against dev-synapsePythonClient version file
    version_check(
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Should be higher than current version and return true
    assert version_check(
        current_version="999.999.999",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test out of date version
    assert not version_check(
        current_version="0.0.1",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test blacklisted version
    assert_raises(
        SystemExit,
        version_check,
        current_version="0.0.0",
        version_url=
        "http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test bad URL
    assert not version_check(
        current_version="999.999.999",
        version_url=
        "http://dev-versions.synapse.sagebase.org/bad_filename_doesnt_exist")
def test_version_check():
    # Check current version against dev-synapsePythonClient version file
    version_check(version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Should be higher than current version and return true
    assert version_check(current_version="999.999.999", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test out of date version
    assert not version_check(current_version="0.0.1", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test blacklisted version
    assert_raises(SystemExit, version_check, current_version="0.0.0", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    # Test bad URL
    assert not version_check(current_version="999.999.999", version_url="http://dev-versions.synapse.sagebase.org/bad_filename_doesnt_exist")
def test_version_check():
    """
    test the version checking and blacklisting functionality
    """

    ## current version against dev synapsePythonClient version file
    version_check(version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## should be higher than current version and return true
    assert version_check(current_version="999.999.999", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test out of date version
    assert not version_check(current_version="0.0.1", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test blacklisted version
    assert_raises(SystemExit, version_check, current_version="0.0.0", version_url="http://dev-versions.synapse.sagebase.org/synapsePythonClient")

    ## test bad url
    assert not version_check(current_version="999.999.999", version_url="http://dev-versions.synapse.sagebase.org/bad_filename_doesnt_exist")