'Verify that the container visibility modal shows that unit visibility
settings have been edited if there are `set_groups`. Otherwise verify
that the modal shows no such information.'

def verify_unit_visibility_set(self, unit, set_groups=[]):

    unit_access_editor = self.edit_unit_visibility(unit)
    if set_groups:
        self.assertIn(',    '.join(set_groups), unit_access_editor.current_groups_message)
    else:
        self.assertEqual(self.MODAL_NOT_RESTRICTED_MESSAGE, unit_access_editor.current_groups_message)
    unit_access_editor.cancel()
