'Behavior is correct if --no-location switch is specified. See #16903.'

def test_no_location_enabled(self):

    os.chdir(self.test_dir)
    management.call_command(u'makemessages', locale=[LOCALE], verbosity=0, no_location=True)
    self.assertTrue(os.path.exists(self.PO_FILE))
    with open(self.PO_FILE, u'r') as fp:
        po_contents = force_text(fp.read())
        needle = os.sep.join([u'#:    templates', u'test.html:55'])
        self.assertFalse((needle in po_contents), (u'"%s"    shouldn\'t    be    in    final    .po    file.' % needle))
