コード例 #1
0
 def test_calling_get_with_invalid_key_and_no_default_value_returns_none(
         self):
     cs = ConnectionString(
         "HostName=my.host.name;SharedAccessKeyName=mykeyname;SharedAccessKey=Zm9vYmFy"
     )
     assert cs.get("invalidkey") is None
コード例 #2
0
def test_get_item_does_not_exist_no_given_default():
    cs = ConnectionString(
        "HostName=my.host.name;SharedAccessKeyName=mykeyname;SharedAccessKey=Zm9vYmFy"
    )
    assert cs.get("invalidkey") == None
コード例 #3
0
 def test_calling_get_with_key_returns_corresponding_value(self):
     cs = ConnectionString(
         "HostName=my.host.name;SharedAccessKeyName=mykeyname;SharedAccessKey=Zm9vYmFy"
     )
     assert cs.get("HostName") == "my.host.name"
コード例 #4
0
def test_get_item_exists():
    cs = ConnectionString(
        "HostName=my.host.name;SharedAccessKeyName=mykeyname;SharedAccessKey=Zm9vYmFy"
    )
    assert cs.get("HostName") == "my.host.name"