Example #1
0
 def test_delattr(self):
     n = tools.Null()
     self.assertEqual(n, n.__delattr__('key'))
Example #2
0
 def test_setattr(self):
     n = tools.Null()
     self.assertEqual(n, n.__setattr__('key', 'value'))
Example #3
0
 def test_call(self):
     n = tools.Null()
     self.assertEqual(n, n())
     self.assertEqual(n, n(1))
Example #4
0
 def test_nonzero(self):
     self.assertFalse(bool(tools.Null()))
Example #5
0
 def test_init(self):
     self.assertDictEqual(tools.Null().__dict__, {})
     self.assertDictEqual(tools.Null('args').__dict__, {})