Example #1
0
 def test_not_required_is_light_yellow(self):
     with mock.patch(
             'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'required': False})
         self.assertTrue(
             "fore_color light_yellow" in easyxf.call_args[0][0])
Example #2
0
 def test_ignored_is_gray(self):
     with mock.patch(
             'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'ignore': True})
         self.assertTrue("fore_color gray" in easyxf.call_args[0][0])
Example #3
0
 def test_required_is_orange(self):
     with mock.patch(
             'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'required': True})
         self.assertTrue("fore_color orange" in easyxf.call_args[0][0])
Example #4
0
 def test_wraps(self):
     """All header text should wrap"""
     with mock.patch(
             'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(0, 0, {})
         self.assertTrue("wrap on" in easyxf.call_args[0][0])
Example #5
0
 def test_row_2_not_bold(self):
     with mock.patch(
             'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(2, 1, {})
         self.assertTrue("bold on" not in easyxf.call_args[0][0])
 def test_not_required_is_light_yellow(self):
     with mock.patch(
         'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'required': False})
         self.assertTrue(
             "fore_color light_yellow" in easyxf.call_args[0][0])
 def test_required_is_orange(self):
     with mock.patch(
         'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'required': True})
         self.assertTrue("fore_color orange" in easyxf.call_args[0][0])
 def test_ignored_is_gray(self):
     with mock.patch(
         'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(1, 1, {'ignore': True})
         self.assertTrue("fore_color gray" in easyxf.call_args[0][0])
 def test_row_2_not_bold(self):
     with mock.patch(
         'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(2, 1, {})
         self.assertTrue("bold on" not in easyxf.call_args[0][0])
 def test_wraps(self):
     """All header text should wrap"""
     with mock.patch(
         'flooding_lib.excel_import_export.make_style') as easyxf:
         eie.get_header_style_for(0, 0, {})
         self.assertTrue("wrap on" in easyxf.call_args[0][0])