Skip to content

Instantly share code, notes, and snippets.

@ryanermita
Last active January 20, 2019 09:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryanermita/36a48c2cc05a21669d3741fa7d1eb851 to your computer and use it in GitHub Desktop.
Save ryanermita/36a48c2cc05a21669d3741fa7d1eb851 to your computer and use it in GitHub Desktop.
pre-created magic methods for MagicMock object.
__lt__: NotImplemented
__gt__: NotImplemented
__le__: NotImplemented
__ge__: NotImplemented
__int__: 1
__contains__: False
__len__: 0
__iter__: iter([])
__exit__: False
__complex__: 1j
__float__: 1.0
__bool__: True
__index__: 1
__hash__: default hash for the mock
__str__: default str for the mock
__sizeof__: default sizeof for the mock
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment