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