コード例 #1
0
def test_get():
    request = Request('create', 'bla', 's')
    request['ResourceProperties'] = {'Test': '123'}
    provider = ResourceProvider()
    provider.set_request(request, {})
    assert provider.get('Test') == '123'
    assert provider.get('Notthere') is None
    assert provider.get('Notthere', 'mooi') == 'mooi'
コード例 #2
0
def test_get():
    request = Request('create', 'bla', 's')
    request['ResourceProperties'] = {'Test': '123'}
    provider = ResourceProvider()
    provider.set_request(request, {})
    assert provider.get('Test') == '123'
    assert provider.get('Notthere') is None
    assert provider.get('Notthere', 'mooi') == 'mooi'
コード例 #3
0
def test_get():
    request = Request("create", "bla", str(uuid4()))
    request["ResourceProperties"] = {"Test": "123"}
    provider = ResourceProvider()
    provider.set_request(request, {})
    assert provider.get("Test") == "123"
    assert provider.get("Notthere") is None
    assert provider.get("Notthere", "mooi") == "mooi"