votes up 1

There must be at least one expected method

Package:
Exception Class:
ValueError

Raise code

""" 
      expected_methods: [MockMethod]

    Raises:
      ValueError: if expected_methods contains no methods.
    """

    if not expected_methods:
      raise ValueError("There must be at least one expected method")
    Error.__init__(self)
    self._expected_methods = expected_methods

  def __str__(self):
    calls = "\n".join(["%3d.  %s" % (i, m)
                       for i, m in enumerate(self._expected_methods)])
    return "Verify: Expected methods never called:\n%s" % (calls,)
😲 Agile task management is now easier than calling a taxi. #Tracklify

NO FIXES YET

Just press the button and we will add solution
to this exception as soon as possible

* As many users press the button, the faster we create a fix

Add a possible fix

Please authorize to post fix