I suppose this is a trade-off between nicer error messages and future code maintenance, but I would vote for the latter and eliminate the code duplication of these 3 tests to:

```
self.assertEquals(edit_button_html in html, is_editable)
self.assertEquals(delete_button_html, html, is_editable)
self.assertEquals(duplicate_button_html, html, is_editable)
```

Alternatively, if you really want the nicer error messages, then you can accomplish both via:
```
buttons_to_test = [edit_button_html, delete_button_html, duplication_button_html]
for button in buttons_to_test:
   if is_editable:
      self.assertIn(button, html)
   else:
      self.assertNotIn(button, html)
```