Skip to content

Commit

Permalink
rename handler
Browse files Browse the repository at this point in the history
  • Loading branch information
manosprom committed Dec 13, 2023
1 parent b44ac80 commit 10970ed
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,10 @@ def wrap(string, hyperlink=None):
return "<tx{}>{}</tx>".format(href, string)


class XlsxSingleLanguageHandler(Handler, OfficeOpenXmlHandler):
class XlsxUnstructuredHandler(Handler, OfficeOpenXmlHandler):
PROCESSES_BINARY = True
EXTRACTS_RAW = False
name = "XLSX_SINGLE_LANGUAGE"
name = "XLSX_UNSTRUCTURED"

@staticmethod
def _extract_sheet_names(xlsx, order):
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,12 @@
import unittest
import uuid

from openformats.formats.xlsx import XlsxSingleLanguageHandler, XlsxFile
from openformats.formats.xlsx_unstructured import XlsxUnstructuredHandler, XlsxFile
from openformats.strings import OpenString


class XlsxTestCase(unittest.TestCase):
TESTFILE_BASE = "openformats/tests/formats/xlsx/files"
TESTFILE_BASE = "openformats/tests/formats/xlsx_unstructured/files"

def setUp(self):
self.maxDiff = None
Expand Down Expand Up @@ -107,7 +107,7 @@ def test_xlsx_file(self, m_uuid):

def test_xlsx_handler_parse(self):
content = self.load_file("example.xlsx")
xlsx_handler = XlsxSingleLanguageHandler()
xlsx_handler = XlsxUnstructuredHandler()
template, stringset = xlsx_handler.parse(content)
self.assertIsNotNone(template)
self.assertEqual(len(stringset), 12)
Expand Down Expand Up @@ -222,7 +222,7 @@ def test_xlsx_handler_parse(self):

def test_xlsx_handler_compilation_reverse(self):
content = self.load_file("example.xlsx")
xlsx_handler = XlsxSingleLanguageHandler()
xlsx_handler = XlsxUnstructuredHandler()
template, stringset = xlsx_handler.parse(content)

new_stringset = []
Expand Down Expand Up @@ -288,7 +288,7 @@ def test_xlsx_handler_compilation_reverse(self):

def test_strings_with_less_tx_tags(self):
content = self.load_file("example.xlsx")
xlsx_handler = XlsxSingleLanguageHandler()
xlsx_handler = XlsxUnstructuredHandler()
template, stringset = xlsx_handler.parse(content)

self.assert_open_string(
Expand All @@ -309,7 +309,7 @@ def test_strings_with_less_tx_tags(self):

def test_extract_compile_hyperlink_formulas(self):
content = self.load_file("example.xlsx")
xlsx_handler = XlsxSingleLanguageHandler()
xlsx_handler = XlsxUnstructuredHandler()
template, stringset = xlsx_handler.parse(content)

self.assert_open_string(
Expand Down

0 comments on commit 10970ed

Please sign in to comment.