# -*- coding: utf-8 -*-

import pytest

import pycamunda.deployment


def test_resource_load():
    resource = pycamunda.deployment.Resource.load(
        {'id': 'anId', 'name': 'aName', 'deploymentId': 'aDeploymentId'}
    )

    assert resource.id_ == 'anId'
    assert resource.name == 'aName'
    assert resource.deployment_id == 'aDeploymentId'


def test_resource_load_raises_keyerror():
    resource_json = {'id': 'anId', 'name': 'aName', 'deploymentId': 'aDeploymentId'}
    for key in resource_json:
        json_ = dict(resource_json)
        del json_[key]
        with pytest.raises(KeyError):
            pycamunda.deployment.Resource.load(data=json_)

b3a47da7194a8b31c4d80bad0c47d67cd742f184
<mask token>

<mask token>


def test_resource_load_raises_keyerror():
    resource_json = {'id': 'anId', 'name': 'aName', 'deploymentId':
        'aDeploymentId'}
    for key in resource_json:
        json_ = dict(resource_json)
        del json_[key]
        with pytest.raises(KeyError):
            pycamunda.deployment.Resource.load(data=json_)

<mask token>


def test_resource_load():
    resource = pycamunda.deployment.Resource.load({'id': 'anId', 'name':
        'aName', 'deploymentId': 'aDeploymentId'})
    assert resource.id_ == 'anId'
    assert resource.name == 'aName'
    assert resource.deployment_id == 'aDeploymentId'


def test_resource_load_raises_keyerror():
    resource_json = {'id': 'anId', 'name': 'aName', 'deploymentId':
        'aDeploymentId'}
    for key in resource_json:
        json_ = dict(resource_json)
        del json_[key]
        with pytest.raises(KeyError):
            pycamunda.deployment.Resource.load(data=json_)

import pytest
import pycamunda.deployment


def test_resource_load():
    resource = pycamunda.deployment.Resource.load({'id': 'anId', 'name':
        'aName', 'deploymentId': 'aDeploymentId'})
    assert resource.id_ == 'anId'
    assert resource.name == 'aName'
    assert resource.deployment_id == 'aDeploymentId'


def test_resource_load_raises_keyerror():
    resource_json = {'id': 'anId', 'name': 'aName', 'deploymentId':
        'aDeploymentId'}
    for key in resource_json:
        json_ = dict(resource_json)
        del json_[key]
        with pytest.raises(KeyError):
            pycamunda.deployment.Resource.load(data=json_)

# -*- coding: utf-8 -*-

import pytest

import pycamunda.deployment


def test_resource_load():
    resource = pycamunda.deployment.Resource.load(
        {'id': 'anId', 'name': 'aName', 'deploymentId': 'aDeploymentId'}
    )

    assert resource.id_ == 'anId'
    assert resource.name == 'aName'
    assert resource.deployment_id == 'aDeploymentId'


def test_resource_load_raises_keyerror():
    resource_json = {'id': 'anId', 'name': 'aName', 'deploymentId': 'aDeploymentId'}
    for key in resource_json:
        json_ = dict(resource_json)
        del json_[key]
        with pytest.raises(KeyError):
            pycamunda.deployment.Resource.load(data=json_)
