예제 #1
0
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)
예제 #2
0
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)