diff --git a/docassemble/ALToolbox/test_misc.py b/docassemble/ALToolbox/test_misc.py index f276b3f..894b587 100644 --- a/docassemble/ALToolbox/test_misc.py +++ b/docassemble/ALToolbox/test_misc.py @@ -4,12 +4,12 @@ from .misc import button_array, ButtonDict import xml.etree.ElementTree as ET -class TestButtonArray(unittest.TestCase): +class TestButtonArray(unittest.TestCase): def normalize_whitespace(self, s): - return re.sub(r'\s+', ' ', s) - - @patch('docassemble.ALToolbox.misc.user_has_privilege', return_value=False) + return re.sub(r"\s+", " ", s) + + @patch("docassemble.ALToolbox.misc.user_has_privilege", return_value=False) def test_button_array_generates_correct_html(self, mock_privilege): buttons = [ ButtonDict(name="Button 1", image="image1", url="url1"), @@ -27,8 +27,7 @@ def test_button_array_generates_correct_html(self, mock_privilege): self.assertIn("Button 1", button_array_html) self.assertIn("Button 2", button_array_html) - - @patch('docassemble.ALToolbox.misc.user_has_privilege', return_value=False) + @patch("docassemble.ALToolbox.misc.user_has_privilege", return_value=False) def test_button_array_filters_by_privilege(self, mock_privilege): buttons = [ ButtonDict(name="Button 1", image="image1", url="url1", privilege="admin"), @@ -36,5 +35,6 @@ def test_button_array_filters_by_privilege(self, mock_privilege): ] self.assertNotIn("Button 1", button_array(buttons)) -if __name__ == '__main__': - unittest.main() \ No newline at end of file + +if __name__ == "__main__": + unittest.main()