def test_department_name_unique_required(self, db):
        ''' The form won't allow creation of a duplicate department name.
        '''
        test_name = "Any Police Department"
        test_short_name = "APD"
        Department.create(name=test_name, short_name=test_short_name)
        form = NewDepartmentForm(department_name=test_name, department_short_name=test_short_name)
        assert form.validate() is False
        assert form.department_name.errors in 'The department name "{}" is already registered.'.format(test_name)
dataset/ETHPy150Open codeforamerica/comport/tests/test_admin_forms.py/TestNewDepartmentForm.test_department_name_unique_required/swapped operands of `in`