Ejemplo n.º 1
0
 def test_filter_no_dictionary(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_keys = ['one', 'two']
     filtered = utils.filter_dictionary(None, test_keys)
     self.assertEquals(filtered, dict())
Ejemplo n.º 2
0
 def test_filter_no_dictionary(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_keys = ['one', 'two']
     filtered = utils.filter_dictionary(None, test_keys)
     self.assertEquals(filtered, dict())
Ejemplo n.º 3
0
 def test_filter_no_keys(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_dict = dict(one='test1', two='test2', three='test3')
     filtered = utils.filter_dictionary(test_dict, None)
     self.assertEquals(filtered, dict())
Ejemplo n.º 4
0
 def test_filter_dictionary(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_dict = dict(one='test1', two='test2', three='test3')
     test_keys = ['one', 'two']
     filtered = utils.filter_dictionary(test_dict, test_keys)
     self.assertNotIn('three', filtered.keys())
Ejemplo n.º 5
0
 def test_filter_no_keys(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_dict = dict(one='test1',
                      two='test2',
                      three='test3')
     filtered = utils.filter_dictionary(test_dict, None)
     self.assertEquals(filtered, dict())
Ejemplo n.º 6
0
 def test_filter_dictionary(self):
     """
     Asserts that dictionary is filtered properly.
     """
     test_dict = dict(one='test1',
                      two='test2',
                      three='test3')
     test_keys = ['one', 'two']
     filtered = utils.filter_dictionary(test_dict, test_keys)
     self.assertNotIn('three', filtered.keys())