'Test the _write_sheet_protection() method.'

def test_write_sheet_protection_18(self):

    password = 'drowssap'
    options = {'objects': 1, 'scenarios': 1, 'format_cells': 1, 'format_columns': 1, 'format_rows': 1, 'insert_columns': 1, 'insert_rows': 1, 'insert_hyperlinks': 1, 'delete_columns': 1, 'delete_rows': 1, 'select_locked_cells': 0, 'sort': 1, 'autofilter': 1, 'pivot_tables': 1, 'select_unlocked_cells': 0}
    self.worksheet.protect(password, options)
    self.worksheet._write_sheet_protection()
    exp = '<sheetProtection    password="996B"    sheet="1"    formatCells="0"    formatColumns="0"    formatRows="0"    insertColumns="0"    insertRows="0"    insertHyperlinks="0"    deleteColumns="0"    deleteRows="0"    selectLockedCells="1"    sort="0"    autoFilter="0"    pivotTables="0"    selectUnlockedCells="1"/>'
    got = self.fh.getvalue()
    self.assertEqual(got, exp)
