Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix: Service Manager loads wrong service Test-config #1907

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cypress/integration/spec_wallet_utxo.js
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ describe('Test the actions in UTXO list', () => {
cy.log("Check the labeling of the unsigned UTXO")
cy.get('#btn_transactions').click()
cy.wait(1000)
cy.get('tx-table').find('.utxo-view-btn').click()
cy.get('tx-table').find('.utxo-view-btn').click({ force: true })
cy.get('tx-table').find('tx-row').eq(2).find('#column-category').should('contain', 'Unsigned')
cy.get('tx-table').find('tx-row').eq(3).find('#column-category').should('contain', 'Unsigned')
// Check that only the two checkboxes of the unsigned UTXO are visible
Expand Down
6 changes: 3 additions & 3 deletions src/cryptoadvance/specter/managers/service_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ def configure_service_for_module(cls, clazz):
if isclass(attribute):
clazz = attribute
potential_config_classes.append(clazz)
if clazz.__name__.endswith(
main_config_clazz_slug
if (
clazz.__name__.split(".")[-1] == main_config_clazz_slug
): # e.g. BaseConfig or DevelopmentConfig
cls.import_config(clazz)
return
Expand All @@ -270,7 +270,7 @@ def configure_service_for_module(cls, clazz):
config_candidate_class = config_clazz.__bases__[0]
while config_candidate_class != object:
for clazz in potential_config_classes:
if clazz.__name__.endswith(config_candidate_class.__name__):
if clazz.__name__.split(".")[-1] == config_candidate_class.__name__:
cls.import_config(clazz)
return
config_candidate_class = config_candidate_class.__bases__[0]
Expand Down