Пример #1
0
def test_cross_sell_plugin_with_invalid_type():
    plugin = ProductCrossSellsPlugin({"type": "foobar"})
    assert plugin.config["type"] == ProductCrossSellType.RELATED

    plugin.config["type"] = "foobar"
    context_data = plugin.get_context_data({"request": "REQUEST"})
    assert context_data["type"] == ProductCrossSellType.RELATED
Пример #2
0
def test_cross_sell_plugin_with_invalid_type():
    plugin = ProductCrossSellsPlugin({"type": "foobar"})
    assert plugin.config['type'] == ProductCrossSellType.RELATED

    plugin.config['type'] = 'foobar'
    context_data = plugin.get_context_data({'request': 'REQUEST'})
    assert context_data['type'] == ProductCrossSellType.RELATED
Пример #3
0
def test_cross_sell_plugin_with_invalid_type():
    plugin = ProductCrossSellsPlugin({"type": "foobar"})
    assert plugin.config['type'] == ProductCrossSellType.RELATED

    plugin.config['type'] = 'foobar'
    context_data = plugin.get_context_data({'request': 'REQUEST'})
    assert context_data['type'] == ProductCrossSellType.RELATED