Package entropy :: Package services :: Package test :: Module interfaces

Source Code for Module entropy.services.test.interfaces

 1  # -*- coding: utf-8 -*- 
 2  """ 
 3   
 4      @author: Fabio Erculiani <lxnay@sabayonlinux.org> 
 5      @contact: lxnay@sabayonlinux.org 
 6      @copyright: Fabio Erculiani 
 7      @license: GPL-2 
 8   
 9      B{Entropy Services Testing Interface}. 
10   
11  """ 
12  from entropy.services.interfaces import SocketHost 
13  from entropy.const import etpConst 
14  from entropy.output import TextInterface 
15   
16 -class Server(SocketHost):
17
19 - def __init__(self, *args, **kwargs):
20 self.Text = TextInterface() 21 self.Text.updateProgress(":: FakeServiceInterface loaded ::")
22
23 - def __init__(self, do_ssl = False, stdout_logging = True, 24 entropy_interface_kwargs = {}, **kwargs):
25 26 from entropy.services.system.commands import Base 27 if not kwargs.has_key('external_cmd_classes'): 28 kwargs['external_cmd_classes'] = [] 29 kwargs['external_cmd_classes'].insert(0, Base) 30 31 self.Text = TextInterface() 32 SocketHost.__init__( 33 self, 34 self.FakeServiceInterface, 35 sock_output = self.Text, 36 ssl = do_ssl, 37 **kwargs 38 ) 39 self.stdout_logging = stdout_logging
40