          title = 'Boss'
          isbn = '12345'
          DerivedBook.objects.create(title=title, author=self.writer, isbn=isbn)
          form = DerivedBookForm({
                      'title': 'Other',
                      'author': self.writer.pk,
                      'isbn': '9876',
                      'suffix1': '0',
                      'suffix2': '0'
                  })
          self.assertFalse(form.is_valid())
          self.assertEqual(len(form.errors), 1)
          self.assertEqual(form.errors['__all__'],
                           ['Derived book with this Suffix1 and Suffix2 already exists.'])
  
 
</s> remove                         form[cl.model._meta.pk.name].is_hidden)):
 </s> add                     form[cl.model._meta.pk.name].is_hidden)): </s> remove             return self.add_view(request, form_url=reverse('admin:%s_%s_add' %
                                    (opts.app_label, opts.model_name),
                                    current_app=self.admin_site.name))
 </s> add             return self.add_view(request, form_url=reverse('admin:%s_%s_add' % (
                opts.app_label, opts.model_name),
                current_app=self.admin_site.name)) </s> remove             'form-TOTAL_FORMS': '4',
            'form-INITIAL_FORMS': '0',
            'form-MAX_NUM_FORMS': '4',
            'form-0-username': 'John',
            'form-0-serial': '1',
            'form-1-username': 'Paul',
            'form-1-serial': '2',
            'form-2-username': 'George',
            'form-2-serial': '3',
            'form-3-username': 'Ringo',
            'form-3-serial': '5',
            }
 </s> add         'form-TOTAL_FORMS': '4',
        'form-INITIAL_FORMS': '0',
        'form-MAX_NUM_FORMS': '4',
        'form-0-username': 'John',
        'form-0-serial': '1',
        'form-1-username': 'Paul',
        'form-1-serial': '2',
        'form-2-username': 'George',
        'form-2-serial': '3',
        'form-3-username': 'Ringo',
        'form-3-serial': '5',
    } </s> remove                 related_modeladmin = self.admin_site._registry.get(
                                                            db_field.rel.to)
 </s> add                 related_modeladmin = self.admin_site._registry.get(db_field.rel.to) </s> remove                 'value': 123,
                'fn': datetime.now,
 </s> add             'value': 123,
            'fn': datetime.now,
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
          title = 'Boss'
          isbn = '12345'
          DerivedBook.objects.create(title=title, author=self.writer, isbn=isbn)
          form = DerivedBookForm({
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
            'title': 'Other',
            'author': self.writer.pk,
            'isbn': '9876',
            'suffix1': '0',
            'suffix2': '0'
        })
          self.assertFalse(form.is_valid())
          self.assertEqual(len(form.errors), 1)
          self.assertEqual(form.errors['__all__'],
                           ['Derived book with this Suffix1 and Suffix2 already exists.'])
  
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
 Fixed #21288 -- Fixed E126 pep8 warnings 
tests/model_forms/tests.py