def test_not_equals(self): assert utils.Annotation() != 7 assert utils.Annotation() != utils.Annotation({'foo': 'bar'})
def annotate(func, key, options, **kwargs): annotation = utils.Annotation(options, **kwargs) func.__apispec__ = func.__dict__.get('__apispec__', {}) func.__apispec__.setdefault(key, []).insert(0, annotation)
def test_equals(self): assert utils.Annotation() == utils.Annotation()