Example #1
0
    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"
Example #2
0
 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"
Example #3
0
    def test_get(self):
        warnings.simplefilter("ignore", DeprecationWarning)
        warnings.simplefilter("ignore", RuntimeWarning)

        data = Data({'tag': "somedata"})
        assert data.get("tag") == "somedata"
Example #4
0
 def test_get (self):
     warnings.simplefilter("ignore", DeprecationWarning)
     warnings.simplefilter("ignore", RuntimeWarning)
     
     data = Data({'tag':"somedata"})
     assert data.get("tag") == "somedata"