
class Deployment(object):
    """
    """
    _gear_client = None

    def start_container(self, application):
        """
        Launch the supplied application as a `gear` unit.
        """

    def stop_container(self, application):
        """
        Stop and disable the application.
        """


from .gear import GearClient

class Deployment(object):
    """
    """
    def __init__(self, gear_client=None):
        """
        :param IGearClient gear_client: The gear client API to use in deployment
            operations. Default ``GearClient``.
        """
        if gear_client is None:
            gear_client = GearClient(hostname=b'127.0.0.1')
        self._gear_client = gear_client

    def start_container(self, application):
        """
        Launch the supplied application as a `gear` unit.
        """

    def stop_container(self, application):
        """
        Stop and disable the application.
        """

Allow a fake gear client to be supplied
Allow a fake gear client to be supplied

+ 
+ from .gear import GearClient
  
  class Deployment(object):
      """
      """
+     def __init__(self, gear_client=None):
+         """
+         :param IGearClient gear_client: The gear client API to use in deployment
+             operations. Default ``GearClient``.
+         """
-     _gear_client = None
+         if gear_client is None:
+             gear_client = GearClient(hostname=b'127.0.0.1')
+         self._gear_client = gear_client
  
      def start_container(self, application):
          """
          Launch the supplied application as a `gear` unit.
          """
  
      def stop_container(self, application):
          """
          Stop and disable the application.
          """
  
Allow a fake gear client to be supplied
## Code Before:

class Deployment(object):
    """
    """
    _gear_client = None

    def start_container(self, application):
        """
        Launch the supplied application as a `gear` unit.
        """

    def stop_container(self, application):
        """
        Stop and disable the application.
        """

## Instruction:
Allow a fake gear client to be supplied
## Code After:

from .gear import GearClient

class Deployment(object):
    """
    """
    def __init__(self, gear_client=None):
        """
        :param IGearClient gear_client: The gear client API to use in deployment
            operations. Default ``GearClient``.
        """
        if gear_client is None:
            gear_client = GearClient(hostname=b'127.0.0.1')
        self._gear_client = gear_client

    def start_container(self, application):
        """
        Launch the supplied application as a `gear` unit.
        """

    def stop_container(self, application):
        """
        Stop and disable the application.
        """
