def test_check_key_not_exist(): with patch('modelo.pastas.find_one') as p: p.return_value=None eq_(modelo.check_key(1,2), True)
def test_check_key_exist(): with patch('modelo.pastas.find_one') as p: p.return_value=1 # not none eq_(modelo.check_key(1,2), False)