<s> """<STR_LIT>""" <EOL> import threading <EOL> from grr . client import client_stats <EOL> from grr . client import comms <EOL> from grr . lib . rdfvalues import flows as rdf_flows <EOL> class FakeClientWorker ( comms . GRRClientWorker ) : <EOL> """<STR_LIT>""" <EOL> suspended_actions = { } <EOL> def __init__ ( self ) : <EOL> self . responses = [ ] <EOL> self . sent_bytes_per_flow = { } <EOL> self . lock = threading . RLock ( ) <EOL> self . stats_collector = client_stats . ClientStatsCollector ( self ) <EOL> def __del__ ( self ) : <EOL> pass <EOL> def SendReply ( self , rdf_value , <EOL> message_type = rdf_flows . GrrMessage . Type . MESSAGE , ** kw ) : <EOL> message = rdf_flows . GrrMessage ( <EOL> type = message_type , payload = rdf_value , ** kw ) <EOL> self . responses . append ( message ) <EOL> def Drain ( self ) : <EOL> result = self . responses <EOL> self . responses = [ ] <EOL> return result </s>
