def test_genpass_generates_a_password_with_length_32(self): password = genpass() self.assertEqual(len(password), 32)
def test_genpass_raises_value_error_when_regex_pattern_error(mocker): mocker.patch('passpie.utils.rstr.xeger', side_effect=re.error) with pytest.raises(ValueError): genpass("\w{32}")
def test_genpass_generates_a_password_with_length_32(mocker): password = genpass("\w{32}") assert len(password) == 32