<s> import pytest <EOL> pytestmark = pytest . mark . network <EOL> @ pytest . fixture ( scope = '<STR_LIT>' ) <EOL> def firewall ( ) : <EOL> from fabtools . require . shorewall import firewall <EOL> import fabtools . shorewall <EOL> firewall ( <EOL> rules = [ <EOL> fabtools . shorewall . Ping ( ) , <EOL> fabtools . shorewall . SSH ( ) , <EOL> fabtools . shorewall . HTTP ( ) , <EOL> fabtools . shorewall . HTTPS ( ) , <EOL> fabtools . shorewall . SMTP ( ) , <EOL> fabtools . shorewall . rule ( <EOL> port = <NUM_LIT> , <EOL> source = fabtools . shorewall . hosts ( [ '<STR_LIT>' ] ) , <EOL> ) , <EOL> ] <EOL> ) <EOL> def test_require_firewall_started ( firewall ) : <EOL> from fabtools . require . shorewall import started <EOL> from fabtools . shorewall import is_started <EOL> started ( ) <EOL> assert is_started ( ) <EOL> def test_require_firewall_stopped ( firewall ) : <EOL> from fabtools . require . shorewall import stopped <EOL> from fabtools . shorewall import is_stopped <EOL> stopped ( ) <EOL> assert is_stopped ( ) </s>
