Skip to content

Commit

Permalink
Refactor so submind may be defined after test case import
Browse files Browse the repository at this point in the history
  • Loading branch information
NeonDaniel committed Nov 30, 2023
1 parent 76ee630 commit c47e438
Showing 1 changed file with 10 additions and 6 deletions.
16 changes: 10 additions & 6 deletions neon_minerva/tests/chatbot_v1_test_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,16 +29,20 @@


class TestSubmind(unittest.TestCase):
# Determine submind to test
submind_entrypoint = getenv("TEST_BOT_ENTRYPOINT")
bot_class = load_chatbot(submind_entrypoint)
# Initialize a server for testing
server = MachKlatServer()
sleep(1)
socket = start_socket("0.0.0.0")
# Initialize a submind instance
submind = bot_class(socket, "Private", "testrunner", "testpassword",
on_server=False)
submind = None

@classmethod
def setUpClass(cls) -> None:
# Determine submind to test
submind_entrypoint = getenv("TEST_BOT_ENTRYPOINT")
bot_class = load_chatbot(submind_entrypoint)
# Initialize a submind instance
cls.submind = bot_class(cls.socket, "Private", "testrunner",
"testpassword", on_server=False)

@classmethod
def tearDownClass(cls) -> None:
Expand Down

0 comments on commit c47e438

Please sign in to comment.