'Tests the AddField operation on TextField/BinaryField.'

def test_add_binaryfield(self):

    project_state = self.set_up_test_model('test_adbinfl')
    Pony = project_state.apps.get_model('test_adbinfl', 'Pony')
    pony = Pony.objects.create(weight=42)
    new_state = self.apply_operations('test_adbinfl', project_state, [migrations.AddField('Pony', 'blob', models.BinaryField(default='some    text')), migrations.AddField('Pony', 'empty', models.BinaryField(default='')), migrations.AddField('Pony', 'digits', models.BinaryField(default='42')), migrations.AddField('Pony', 'quotes', models.BinaryField(default='"\'"'))])
    Pony = new_state.apps.get_model('test_adbinfl', 'Pony')
    pony = Pony.objects.get(pk=pony.pk)
    self.assertEqual(bytes(pony.blob), 'some    text')
    self.assertEqual(bytes(pony.empty), '')
    self.assertEqual(bytes(pony.digits), '42')
    self.assertEqual(bytes(pony.quotes), '"\'"')
