Improve coverage

This commit is contained in:
Adrien Ferrand 2019-12-28 23:52:54 +01:00
parent 855efe5cbb
commit ae660e1b0d
2 changed files with 5 additions and 4 deletions

View file

@ -20,7 +20,7 @@ class VersionedLEACMEMixin(object):
# Required for @property to operate properly. See comment above.
object.__setattr__(self, key, value)
else:
super(VersionedLEACMEMixin, self).__setattr__(key, value)
super(VersionedLEACMEMixin, self).__setattr__(key, value) # pragma: no cover
class ResourceMixin(VersionedLEACMEMixin):
@ -36,7 +36,7 @@ class ResourceMixin(VersionedLEACMEMixin):
jobj.pop('resource', None)
return jobj
raise AttributeError('This class does not implement method to_partial_json().')
raise AttributeError('This class does not implement method to_partial_json().') # pragma: no cover
class TypeMixin(VersionedLEACMEMixin):
@ -52,4 +52,4 @@ class TypeMixin(VersionedLEACMEMixin):
jobj.pop('type', None)
return jobj
raise AttributeError('This class does not implement method to_partial_json().')
raise AttributeError('This class does not implement method to_partial_json().') # pragma: no cover

View file

@ -16,6 +16,7 @@ from acme import errors
from acme import jws as acme_jws
from acme import messages
from acme.magic_typing import Dict # pylint: disable=unused-import, no-name-in-module
from acme.mixins import VersionedLEACMEMixin
import messages_test
import test_util
@ -899,7 +900,7 @@ class ClientV2Test(ClientTestBase):
self.client.net.get.assert_called_once_with(self.authzr2.uri)
class MockJSONDeSerializable(jose.JSONDeSerializable):
class MockJSONDeSerializable(VersionedLEACMEMixin, jose.JSONDeSerializable):
# pylint: disable=missing-docstring
def __init__(self, value):
self.value = value