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 1556944 commit 4a5f74c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions src/yafowil/widget/image/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,15 @@
resources.add(wr.ScriptResource(
name='yafowil-image-js',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-image/default',
depends='jquery-js',
resource='widget.js',
compressed='widget.min.js'
))
resources.add(wr.StyleResource(
name='yafowil-image-css',
directory=os.path.join(resources_dir, 'default'),
path='yafowil-image/default',
resource='widget.min.css'
))

Expand Down
4 changes: 2 additions & 2 deletions src/yafowil/widget/image/tests/test_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -1163,15 +1163,15 @@ def test_resources(self):
self.assertEqual(len(scripts), 1)

self.assertTrue(scripts[0].directory.endswith(np('/image/resources/default')))
self.assertEqual(scripts[0].path, 'yafowil-image')
self.assertEqual(scripts[0].path, 'yafowil-image/default')
self.assertEqual(scripts[0].file_name, 'widget.min.js')
self.assertTrue(os.path.exists(scripts[0].file_path))

styles = resources.styles
self.assertEqual(len(styles), 1)

self.assertTrue(styles[0].directory.endswith(np('/image/resources/default')))
self.assertEqual(styles[0].path, 'yafowil-image')
self.assertEqual(styles[0].path, 'yafowil-image/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 4a5f74c

Please sign in to comment.