initial forged-from protection

This commit is contained in:
holger krekel
2023-10-18 13:10:28 +02:00
parent 1ea25eb28c
commit 7e93299bce
6 changed files with 215 additions and 41 deletions

View File

@@ -199,3 +199,13 @@ class Remote:
while 1:
line = self.popen.stdout.readline()
yield line.decode().strip().lower()
@pytest.fixture
def mailgen(request):
class Mailgen:
def get_encrypted(self, from_addr, to_addr):
data = request.fspath.dirpath("mailgen/encrypted.eml").read()
return data.format(from_addr=from_addr, to_addr=to_addr)
return Mailgen()