def test_get_quota(): m = Mock(spec=ArcticLibraryBinding) m.get_library_metadata.return_value = 42 assert ArcticLibraryBinding.get_quota(m) == 42 m.get_library_metadata.assert_called_once_with('QUOTA')
def test_get_quota(): self = create_autospec(ArcticLibraryBinding) self.get_library_metadata.return_value = 42 assert ArcticLibraryBinding.get_quota(self) == 42 self.get_library_metadata.assert_called_once_with('QUOTA')