Exemplo n.º 1
0
 def test_checks_mult(self):
     abort = Mock()
     check_dict(
         dict(hello=1,
              yoko='in vain',
              was='it',
              these='the pros and cons of hitchiking'), abort,
         ('goodbye', 'agag', 'helloo', 'these'), 'was', 'yoko', 'hello')
     abort.assert_not_called()
Exemplo n.º 2
0
 def test_checks_dict_with_pass_option_big(self):
     abort = Mock()
     check_dict(
         dict(hello=1,
              yoko='in vain',
              was='it',
              these='the pros and cons of hitchiking'), abort,
         ('goodbye', 'agag', 'helloo', 'these'))
     abort.assert_not_called()
Exemplo n.º 3
0
 def test_checks_dict_with_tup(self):
     abort = Mock()
     check_dict(dict(hello=1), abort, ('hello', ))
     abort.assert_not_called()
Exemplo n.º 4
0
 def test_checks_dict_with_fail_option(self):
     abort = Mock()
     check_dict(dict(hello=1), abort, ('goodbye', 'agag', 'helloo'))
     abort.assert_called_once()
Exemplo n.º 5
0
 def test_checks_dict_with_pass_option(self):
     abort = Mock()
     check_dict(dict(hello=1), abort, ('goodbye', 'agag', 'hello'))
     abort.assert_not_called()
Exemplo n.º 6
0
 def test_checks_dict_with_fail(self):
     abort = Mock()
     check_dict(dict(hello=1), abort, 'goodbye')
     abort.assert_called_once()
Exemplo n.º 7
0
 def test_checks_dict_with_item(self):
     abort = Mock()
     check_dict(dict(hello=1), abort, 'hello')
     abort.assert_not_called()