Example #1
0
 def test_map(self):
     self.assertEquals(self.MAPPED_DICT,
                       __unit__.mapitems(MapItems.FUNCTION, self.DICT))
Example #2
0
 def test_dict__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, object())
Example #3
0
 def test_dict__empty(self):
     self.assertEquals({}, __unit__.mapitems(None, {}))
     self.assertEquals({}, __unit__.mapitems(MapItems.FUNCTION, {}))
Example #4
0
 def test_function__non_function(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(object(), self.DICT)
Example #5
0
 def test_dict__none(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, None)
Example #6
0
 def test_map(self):
     self.assertEquals(self.MAPPED_DICT,
                       __unit__.mapitems(MapItems.FUNCTION, self.DICT))
Example #7
0
 def test_function__none(self):
     self.assertEquals(self.DICT, __unit__.mapitems(None, self.DICT))
Example #8
0
 def test_dict__empty(self):
     self.assertEquals({}, __unit__.mapitems(None, {}))
     self.assertEquals({}, __unit__.mapitems(MapItems.FUNCTION, {}))
Example #9
0
 def test_dict__some_object(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, object())
Example #10
0
 def test_dict__none(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(MapItems.FUNCTION, None)
Example #11
0
 def test_function__non_function(self):
     with self.assertRaises(TypeError):
         __unit__.mapitems(object(), self.DICT)
Example #12
0
 def test_function__none(self):
     self.assertEquals(self.DICT, __unit__.mapitems(None, self.DICT))