from bottle import template
from pytest import mark

@mark.parametrize('expected', [
    """<div class="vertical-button-group">
  <div class="pure-button-group vertical-button-group" role="nav" style="padding: 1em 0.25em 0;">
    <button
      class="pure-button "
      type="submit"
      formaction="trend"
      style=""
    > Trend </button>
    <button
      class="pure-button pure-button-active"
      type="submit"
      formaction="products"
      style=""
    > Products </button>
    <button
      class="pure-button "
      type="submit"
      formaction="categories"
      style=""
    > Categories </button>
    <button
      class="pure-button "
      type="submit"
      formaction="groups"
      style=""
    > Groups </button>
    <button
      class="pure-button "
      type="submit"
      formaction="tags"
      style=""
    > Tags </button>
  </div>
</div>"""])
def test_form_nav_render_exact(expected):
    assert template('buttongroup-nav', role='nav', action='products', targets=[
        "trend", "products", "categories", "groups", "tags"
    ]) == expected