def test_get_deployments_with_multiple_matches_raises_exception( w3, package_with_multiple_matches): package = Package(package_with_multiple_matches) with pytest.raises(ValidationError): package.get_deployments(w3)
def test_get_deployments_with_no_match_raises_exception( w3, package_with_no_matching_deployments): package = Package(package_with_no_matching_deployments) with pytest.raises(ValidationError): package.get_deployments(w3)
def test_get_deployments_with_empty_deployment_raise_exception( w3, package_with_empty_deployments): package = Package(package_with_empty_deployments) with pytest.raises(ValidationError): package.get_deployments(w3)
def test_get_deployments_with_no_deployments_raises_exception( w3, manifest_with_no_deployments): package = Package(manifest_with_no_deployments) with pytest.raises(ValidationError): package.get_deployments(w3)
def test_get_deployments_with_a_match_returns_deployments( w3, lockfile_with_matching_deployment): package = Package(lockfile_with_matching_deployment) deployment = package.get_deployments(w3) assert isinstance(deployment, Deployments)
def test_get_deployments_with_invalid_w3_raise_exception( notw3, lockfile_with_matching_deployment): package = Package(lockfile_with_matching_deployment) with pytest.raises(ValueError): package.get_deployments(notw3)