-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add inventory report generation script.
- Loading branch information
1 parent
734cb8f
commit 8943083
Showing
6 changed files
with
268 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env python | ||
"""Update the cached sizes of all custom lists.""" | ||
import os | ||
import sys | ||
|
||
bin_dir = os.path.split(__file__)[0] | ||
package_dir = os.path.join(bin_dir, "..") | ||
sys.path.append(os.path.abspath(package_dir)) | ||
from core.scripts import GenerateInventoryReports | ||
|
||
GenerateInventoryReports().run() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ class TestReportController: | |
def test_generate_inventory_report(self, report_fixture: ReportControllerFixture): | ||
ctrl = report_fixture.manager.admin_report_controller | ||
db = report_fixture.ctrl.db | ||
|
||
library = report_fixture.ctrl.db.default_library() | ||
system_admin, _ = create(db.session, Admin, email="[email protected]") | ||
system_admin.add_role(AdminRole.SYSTEM_ADMIN) | ||
default = db.default_library() | ||
|