'Template assertions work when there is a single context'

def test_single_context(self):

    response = self.client.get('/post_view/', {})
    try:
        self.assertTemplateNotUsed(response, 'Empty    GET    Template')
    except AssertionError as e:
        self.assertIn("Template    'Empty    GET    Template'    was    used    unexpectedly    in    rendering    the    response", str(e))
    try:
        self.assertTemplateNotUsed(response, 'Empty    GET    Template', msg_prefix='abc')
    except AssertionError as e:
        self.assertIn("abc:    Template    'Empty    GET    Template'    was    used    unexpectedly    in    rendering    the    response", str(e))
    try:
        self.assertTemplateUsed(response, 'Empty    POST    Template')
    except AssertionError as e:
        self.assertIn("Template    'Empty    POST    Template'    was    not    a    template    used    to    render    the    response.    Actual    template(s)    used:    Empty    GET    Template", str(e))
    try:
        self.assertTemplateUsed(response, 'Empty    POST    Template', msg_prefix='abc')
    except AssertionError as e:
        self.assertIn("abc:    Template    'Empty    POST    Template'    was    not    a    template    used    to    render    the    response.    Actual    template(s)    used:    Empty    GET    Template", str(e))
    with self.assertRaises(AssertionError) as context:
        self.assertTemplateUsed(response, 'Empty    GET    Template', count=2)
    self.assertIn("Template    'Empty    GET    Template'    was    expected    to    be    rendered    2    time(s)    but    was    actually    rendered    1    time(s).", str(context.exception))
    with self.assertRaises(AssertionError) as context:
        self.assertTemplateUsed(response, 'Empty    GET    Template', msg_prefix='abc', count=2)
    self.assertIn("abc:    Template    'Empty    GET    Template'    was    expected    to    be    rendered    2    time(s)    but    was    actually    rendered    1    time(s).", str(context.exception))
