In one of my templates for detailed view of a device assignment I had logic pertaining to if buttons should appear depending on the user's permission. I wrote tests for these buttons and they work as expected.
Today I wanted to reuse these buttons elsewhere in another template so I extracted it into its own template file and put it in a "partials" folder.
|-templates
| |-assignments
| | |-deviceassignment_form.html
| | |-deviceassignment_detail.html
| | |-deviceassignment_confirm_delete.html
| | |-deviceassignment_list.html
| | |-partials
| | | |-deviceassignment_control_buttons.html
| | | |-deviceassignment_infobox.html
Obviously I can continue testing deviceassignment_detail.html which includes the control buttons and checks to make sure they work (appearing or not based on permissions). But then when I include control buttons elsewhere I might be tempted to test them again...
Instead couldn't I write a test ONLY for the deviceassignment_control_buttons.html template? I want to render the template directly with a basic view context and check that everything works as expected. Is this possible?