Esempio n. 1
0
 def test_do_nothing_caller(self):
     """Test calling the object will always return the same instance."""
     donothing = utils.DoNothing()
     self.assertIs(donothing, donothing())
Esempio n. 2
0
 def test_do_nothing_json_serializable(self):
     """Test calling the object will always return the same instance."""
     donothing = utils.DoNothing()
     self.assertEqual('""', json.dumps(donothing))
Esempio n. 3
0
 def test_do_nothing_getter(self):
     """Test any attribute will always return the same instance (self)."""
     donothing = utils.DoNothing()
     self.assertIs(donothing, donothing.anyname)