Пример #1
0
 def test_it_should_start_server(self):
     with smtp_server() as server:
         assert_that(server.accepting, is_(True))
Пример #2
0
    def test_it_should_stop_server(self):
        with smtp_server() as server:
            pass

        time.sleep(0.02)  # wait for the server to finish
        assert_that(server.is_alive(), is_(False))
Пример #3
0
 def test_it_should_give_a_server(self):
     with smtp_server() as server:
         assert_that(server, is_(instance_of(SmtpServer)))