def test_annotation_method(): ext = AnnotationExtension() ctx = Context() args = [] kwargs = {'a': '27', 'b': '42'} ext.mutate(ctx, Endpoint().endpoint, args, kwargs) assert kwargs == {'a': 27, 'b': 42}
def test_annotation_method(): ext = AnnotationExtension() ctx = Context() args = [] kwargs = {'a': '27', 'b': '42'} ext.mutate(ctx, Endpoint().endpoint, args, kwargs) assert kwargs == {'a': 27, 'b': 42}
def test_annotation_positional(): ext = AnnotationExtension() ctx = Context() args = ['27', '42'] kwargs = {} ext.mutate(ctx, endpoint, args, kwargs) assert args == [27, 42] assert kwargs == {}
def test_annotation_positional(): ext = AnnotationExtension() ctx = Context() args = ['27', '42'] kwargs = {} ext.mutate(ctx, endpoint, args, kwargs) assert args == [27, 42] assert kwargs == {}
def test_annotation_bare(): ext = AnnotationExtension() ctx = Context() args = [] kwargs = {'a': '27', 'b': '42'} ext.mutate(ctx, bare_endpoint, args, kwargs) assert kwargs == {'a': '27', 'b': '42'} assert ext.transform(ctx, bare_endpoint, None) is None
def test_annotation_bare(): ext = AnnotationExtension() ctx = Context() args = [] kwargs = {'a': '27', 'b': '42'} ext.mutate(ctx, bare_endpoint, args, kwargs) assert kwargs == {'a': '27', 'b': '42'} assert ext.transform(ctx, bare_endpoint, None) is None