def test_get_default(self): warnings.simplefilter("ignore", DeprecationWarning) data = Data({'tag': "somedata"}) assert data.get("tag", "default_value") == "somedata" assert data.get("not_an_attribute", "default_value") == "default_value"
def test_get_default (self): warnings.simplefilter("ignore", DeprecationWarning) data = Data({'tag':"somedata"}) assert data.get("tag", "default_value") == "somedata" assert data.get("not_an_attribute", "default_value") == "default_value"
def test_get(self): warnings.simplefilter("ignore", DeprecationWarning) warnings.simplefilter("ignore", RuntimeWarning) data = Data({'tag': "somedata"}) assert data.get("tag") == "somedata"
def test_get (self): warnings.simplefilter("ignore", DeprecationWarning) warnings.simplefilter("ignore", RuntimeWarning) data = Data({'tag':"somedata"}) assert data.get("tag") == "somedata"