From f50854a56476ab047a516390371d54c90d0975f0 Mon Sep 17 00:00:00 2001 From: Rajeev Sashti Date: Thu, 8 Feb 2024 00:37:04 -0500 Subject: [PATCH] Created very small unit test for the resolve_template method in the Conductor class --- test/test_conductor.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/test/test_conductor.py b/test/test_conductor.py index d880254e..95e29817 100644 --- a/test/test_conductor.py +++ b/test/test_conductor.py @@ -1,20 +1,18 @@ from pros.conductor import Conductor -from pros.conductor.templates import BaseTemplate +from pros.conductor.templates import LocalTemplate import unittest class TestConductor(unittest.TestCase): ### using __init__() with the unittest module causes errors, setUp is recognized by the module and should be used instead. - # it will run again before every unit test + # setUp will run before every unit test def setUp(self): self._conductor = Conductor() - print(self._conductor.depots["pros-mainline"].location) - # super().__init__(methodName) - - def test_resolve_template(self, name: str, version: str): - self._okapilib_template = BaseTemplate(name="okapilib") - self._resolved_template = self._conductor.resolve_template(identifier="okapilib") + def test_resolve_template(self): + okapilib_template = LocalTemplate(name="okapilib", version="5.0.0") + resolved_template = self._conductor.resolve_template(identifier="okapilib") + self.assertTrue(resolved_template == okapilib_template) if __name__ == "__main__":