Scenarios

Scenarios describe what you need. They define the tests and the necessary devices for them. Here you can find all scenarios that are implemented in this BalderHub package.

class balderhub.smtp.scenarios.ScenarioSendAndReadBack

Bases: Scenario

Scenario that sends a mail through an SMTP client and verifies it was received by the server.

The scenario consists of a Server device exposing a SmtpReadableServerFeature and a Client device exposing an SmtpClientFeature. Both devices are connected via an SMTP connection. Each test case starts with a freshly rebooted server and an empty outbox.

class Client

Bases: Device

Device representing the SMTP client used to send mails to Server.

class Server

Bases: Device

Device representing the SMTP server.

restart_smtp_server()

Test-case fixture that restarts the SMTP server and clears its outbox before each test.

test_send_mail_and_read_back()

Send a single email from the client and assert that the server receives an equivalent message.