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