def test_map(self): self.assertEquals(self.MAPPED_DICT, __unit__.mapitems(MapItems.FUNCTION, self.DICT))
def test_dict__some_object(self): with self.assertRaises(TypeError): __unit__.mapitems(MapItems.FUNCTION, object())
def test_dict__empty(self): self.assertEquals({}, __unit__.mapitems(None, {})) self.assertEquals({}, __unit__.mapitems(MapItems.FUNCTION, {}))
def test_function__non_function(self): with self.assertRaises(TypeError): __unit__.mapitems(object(), self.DICT)
def test_dict__none(self): with self.assertRaises(TypeError): __unit__.mapitems(MapItems.FUNCTION, None)
def test_function__none(self): self.assertEquals(self.DICT, __unit__.mapitems(None, self.DICT))