Skip to content

Commit

Permalink
more cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
lenadax committed Nov 4, 2024
1 parent bd8cdbb commit a4a7c94
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions src/yafowil/widget/autocomplete/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
resources.add(wr.ScriptResource(
name='yafowil-autocomplete-js',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-autocomplete/default',
depends='jquery-js',
resource='widget.js',
compressed='widget.min.js'
))
resources.add(wr.StyleResource(
name='yafowil-autocomplete-css',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-autocomplete/default',
resource='widget.min.css'
))

Expand Down Expand Up @@ -58,6 +60,7 @@
bootstrap5_js = wr.ScriptResource(
name='yafowil-autocomplete-js',
directory=os.path.join(resources_dir, 'bootstrap5'),
path='yafowil-autocomplete/bootstrap5',
depends='jquery-js',
resource='widget.js',
compressed='widget.min.js'
Expand Down
4 changes: 2 additions & 2 deletions src/yafowil/widget/autocomplete/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ def test_resources(self):
self.assertTrue(
scripts[0].directory.endswith(np('/autocomplete/resources/default'))
)
self.assertEqual(scripts[0].path, 'yafowil-autocomplete')
self.assertEqual(scripts[0].path, 'yafowil-autocomplete/default')
self.assertEqual(scripts[0].file_name, 'widget.min.js')
self.assertTrue(os.path.exists(scripts[0].file_path))

Expand All @@ -156,7 +156,7 @@ def test_resources(self):
self.assertTrue(
styles[0].directory.endswith(np('/autocomplete/resources/default'))
)
self.assertEqual(styles[0].path, 'yafowil-autocomplete')
self.assertEqual(styles[0].path, 'yafowil-autocomplete/default')
self.assertEqual(styles[0].file_name, 'widget.min.css')
self.assertTrue(os.path.exists(styles[0].file_path))

Expand Down

0 comments on commit a4a7c94

Please sign in to comment.