How to use the ipfshttpclient.assert_version function in ipfshttpclient

To help you get started, we’ve selected a few ipfshttpclient examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github ipfs / py-ipfs-http-client / test / functional / tests.py View on Github external
def test_assert_version(self):
        # Minimum required version
        ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0")

        # Too high version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0")

        # Too low version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0")
github ipfs / py-ipfs-http-client / test / unit / test_client.py View on Github external
def test_assert_version():
	# Minimum required version
	ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too high version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too low version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Blacklisted version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.1.2-1", "0.1.0", "0.2.0", ["0.1.2"])
github ipfs / py-ipfs-http-client / test / unit / test_client.py View on Github external
def test_assert_version():
	# Minimum required version
	ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too high version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too low version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Blacklisted version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.1.2-1", "0.1.0", "0.2.0", ["0.1.2"])
github ipfs / py-ipfs-http-client / test / functional / tests.py View on Github external
def test_assert_version(self):
        # Minimum required version
        ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0")

        # Too high version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0")

        # Too low version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0")
github ipfs / py-ipfs-http-client / test / unit / test_client.py View on Github external
def test_assert_version():
	# Minimum required version
	ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too high version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too low version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Blacklisted version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.1.2-1", "0.1.0", "0.2.0", ["0.1.2"])
github ipfs / py-ipfs-http-client / test / functional / tests.py View on Github external
def test_assert_version(self):
        # Minimum required version
        ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0")

        # Too high version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0")

        # Too low version
        with self.assertRaises(ipfshttpclient.exceptions.VersionMismatch):
            ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0")
github ipfs / py-ipfs-http-client / test / unit / test_client.py View on Github external
def test_assert_version():
	# Minimum required version
	ipfshttpclient.assert_version("0.1.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too high version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.2.0", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Too low version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.0.5", "0.1.0", "0.2.0", ["0.1.2"])
	
	# Blacklisted version
	with pytest.raises(ipfshttpclient.exceptions.VersionMismatch):
		ipfshttpclient.assert_version("0.1.2-1", "0.1.0", "0.2.0", ["0.1.2"])