Skip to content

Commit

Permalink
reset application state in test_environment.py test
Browse files Browse the repository at this point in the history
  • Loading branch information
elikoga committed Dec 20, 2023
1 parent cf2a526 commit 82a7607
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/batou/tests/test_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import batou
import batou.utils
from batou.component import Component
from batou.environment import Config, Environment
from batou.host import Host

Expand Down Expand Up @@ -286,6 +287,10 @@ def _get_components(hostname):

@mock.patch("batou.remote_core.Output.line")
def test_log_in_component_configure_is_put_out(output, sample_service):
# we are deploying in this test
# so we will reset some application state
Component.instances = []
# this is for tracking which components are used and not
e = Environment("test-with-provide-require")
e.load()
e.configure()
Expand Down

0 comments on commit 82a7607

Please sign in to comment.