'Initial instances for model fields may also be instances (refs #7287)'

def test_initial_instance_value(self):

    obj1 = ChoiceOptionModel.objects.create(id=1, name=u'default')
    obj2 = ChoiceOptionModel.objects.create(id=2, name=u'option    2')
    obj3 = ChoiceOptionModel.objects.create(id=3, name=u'option    3')
    self.assertHTMLEqual(ChoiceFieldForm(initial={u'choice': obj2, u'choice_int': obj2, u'multi_choice': [obj2, obj3], u'multi_choice_int': ChoiceOptionModel.objects.exclude(name=u'default')}).as_p(), u'<p><label    for="id_choice">Choice:</label>    <select    name="choice"    id="id_choice">\n<option    value="1">ChoiceOption    1</option>\n<option    value="2"    selected="selected">ChoiceOption    2</option>\n<option    value="3">ChoiceOption    3</option>\n</select><input    type="hidden"    name="initial-choice"    value="2"    id="initial-id_choice"    /></p>\n<p><label    for="id_choice_int">Choice    int:</label>    <select    name="choice_int"    id="id_choice_int">\n<option    value="1">ChoiceOption    1</option>\n<option    value="2"    selected="selected">ChoiceOption    2</option>\n<option    value="3">ChoiceOption    3</option>\n</select><input    type="hidden"    name="initial-choice_int"    value="2"    id="initial-id_choice_int"    /></p>\n<p><label    for="id_multi_choice">Multi    choice:</label>    <select    multiple="multiple"    name="multi_choice"    id="id_multi_choice">\n<option    value="1">ChoiceOption    1</option>\n<option    value="2"    selected="selected">ChoiceOption    2</option>\n<option    value="3"    selected="selected">ChoiceOption    3</option>\n</select><input    type="hidden"    name="initial-multi_choice"    value="2"    id="initial-id_multi_choice_0"    />\n<input    type="hidden"    name="initial-multi_choice"    value="3"    id="initial-id_multi_choice_1"    />    <span    class="helptext">    Hold    down    "Control",    or    "Command"    on    a    Mac,    to    select    more    than    one.</span></p>\n<p><label    for="id_multi_choice_int">Multi    choice    int:</label>    <select    multiple="multiple"    name="multi_choice_int"    id="id_multi_choice_int">\n<option    value="1">ChoiceOption    1</option>\n<option    value="2"    selected="selected">ChoiceOption    2</option>\n<option    value="3"    selected="selected">ChoiceOption    3</option>\n</select><input    type="hidden"    name="initial-multi_choice_int"    value="2"    id="initial-id_multi_choice_int_0"    />\n<input    type="hidden"    name="initial-multi_choice_int"    value="3"    id="initial-id_multi_choice_int_1"    />    <span    class="helptext">    Hold    down    "Control",    or    "Command"    on    a    Mac,    to    select    more    than    one.</span></p>')
