This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-ponymail-foal.git
The following commit(s) were added to refs/heads/master by this push:
new c23de58 Fix up test
c23de58 is described below
commit c23de58a52c9a2b9e35d07f8a9c3645138604c15
Author: Sebb <[email protected]>
AuthorDate: Sat Nov 20 19:37:17 2021 +0000
Fix up test
---
test/test_defuzzer.py | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/test/test_defuzzer.py b/test/test_defuzzer.py
index 2380d0b..734a86d 100644
--- a/test/test_defuzzer.py
+++ b/test/test_defuzzer.py
@@ -22,7 +22,15 @@ import pytest
from server.plugins.defuzzer import defuzz
+def test_defuzzer_0():
+ with pytest.raises(ValueError) as excinfo:
+ defuzz({})
+ assert 'You must specify a domain' in str(excinfo.value)
+ with pytest.raises(ValueError) as excinfo:
+ defuzz({'domain': 'invalid'})
+ assert 'You must specify a list' in str(excinfo.value)
+
def test_defuzzer_1():
with pytest.raises(ValueError) as excinfo:
- defuzz({'list': '@'})
+ defuzz({'list': '@', 'domain': 'invalid'})
assert 'cannot contain @' in str(excinfo.value)