{%- if filetype_loop == 0 %}Title,Test,Pass Count,Fail Count
{%- for test,value in assurance_tests.items() if test != "totalTestCount" %}
{%-     for inner_test in value %}
{{ test }},{{ inner_test }},{{ value[inner_test].passCount }},{{ value[inner_test].failCount }}
{%-     endfor %}
{%- endfor %}
{%- else %}
{%-     if filetype_loop == 1 %}
# DNAC Assurance Tests
| Title |  Test | Pass Count | Fail Count |
| ----- | ----- | ---------- | ---------- |
{%- for test,value in assurance_tests.items() if test != "totalTestCount" %}
{%-     for inner_test in value %}
| {{ test }} | {{ inner_test }} | {{ value[inner_test].passCount }} | {{ value[inner_test].failCount }} |
{%-     endfor %}
{%- endfor %}
{%-     else %}
{%-         if filetype_loop == 2 %}
<html><body>
<h1>DNAC Assurance Tests</h1>
<table>
  <thead>
    <tr>
      <th>Title</th>
      <th>Test</th>
      <th>Pass Count</th>
      <th>Fail Count</th>
    </tr>
  </thead>
  <tbody>
{%- for test,value in assurance_tests.items() if test != "totalTestCount" %}
{%-     for inner_test in value %}
  <tr>
    <td>{{ test }}</td>
    <td>{{ inner_test }}</td>
    <td>{{ value[inner_test].passCount }}</td>
    <td>{{ value[inner_test].failCount }}</td>
  </tr>
{%-     endfor %}
{%- endfor %}
  </tbody>
</table>
</body></html>
{%-         else %}
# {{ DNAC }}
## Assurance Sensor Test Results
{%- for test,value in assurance_tests.items() if test != "totalTestCount" %}
### {{ test }}
{%-     for inner_test in value %}
#### {{ inner_test }}
##### Pass Count: {{ value[inner_test].passCount }}
##### Fail Count: {{ value[inner_test].failCount }}
{%-     endfor %}
{%- endfor %}
{%-         endif %}
{%-     endif %}
{%- endif %}