Exemple #1
0
def test_crs_callback(data):
    ctx = MockContext()
    ctx.obj['like'] = {'crs': 'foo'}
    assert info.crs_handler(ctx, MockOption('crs'), 'like') == 'foo'
Exemple #2
0
def test_crs_callback_pass(data):
    """Always return None if the value is None"""
    ctx = MockContext()
    ctx.obj['like'] = {'crs': 'foo'}
    assert info.crs_handler(ctx, MockOption('crs'), None) is None
def test_crs_callback(data):
    ctx = MockContext()
    ctx.obj["like"] = {"crs": "foo"}
    assert info.crs_handler(ctx, MockOption("crs"), "like") == "foo"
def test_crs_callback_pass(data):
    """Always return None if the value is None"""
    ctx = MockContext()
    ctx.obj["like"] = {"crs": "foo"}
    assert info.crs_handler(ctx, MockOption("crs"), None) is None
Exemple #5
0
def test_crs_callback(data):
    ctx = MockContext()
    ctx.obj['like'] = {'crs': 'foo'}
    assert info.crs_handler(ctx, MockOption('crs'), 'like') == 'foo'
Exemple #6
0
def test_crs_callback_pass(data):
    """Always return None if the value is None"""
    ctx = MockContext()
    ctx.obj['like'] = {'crs': 'foo'}
    assert info.crs_handler(ctx, MockOption('crs'), None) is None