Skip to content

Commit

Permalink
Bugfix: Service Manager loads wrong service Test-config (#1907)
Browse files Browse the repository at this point in the history
* fix bug

* fix

see #1907 (comment)

* trying to fix flaky cpyress

Co-authored-by: k9ert <[email protected]>
  • Loading branch information
relativisticelectron and k9ert authored Oct 20, 2022
1 parent 3050893 commit 392da54
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
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

0 comments on commit 392da54

Please sign in to comment.