Skip to content

Commit

Permalink
service_discovery_service.tests.test_service_discovery_service.py: ad…
Browse files Browse the repository at this point in the history
…ded type annotations, refactored new_template_file
  • Loading branch information
DrPyser committed Oct 13, 2023
1 parent ab3d809 commit 8968755
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

import os
import tempfile
from typing import Any
import unittest

from hamcrest import assert_that, equal_to
Expand Down Expand Up @@ -86,15 +87,14 @@ def test_that_the_service_looks_for_remote_servers_when_starting(self):


def new_template_file(content):
f = tempfile.NamedTemporaryFile(delete=False)
with open(f.name, 'w') as f:
with tempfile.NamedTemporaryFile(mode='w', delete=False) as f:
f.write(content)
dir_, name = os.path.split(f.name)
return f, dir_, name


# TODO fix when the config will be generated by events
@unittest.skip
@unittest.skip('fix when the config will be generated by events')
class TestSourceConfigGenerator(unittest.TestCase):
def setUp(self):
(
Expand All @@ -110,7 +110,7 @@ def tearDown(self):
return

def test_generate_with_an_unknown_service(self):
service_discovery_config = {
service_discovery_config: dict[str, Any] = {
'template_path': None,
'services': {},
'hosts': {
Expand Down Expand Up @@ -186,7 +186,7 @@ def test_generate_with_a_service(self):


# TODO fix when the config will be generated by events
@unittest.skip
@unittest.skip("fix when the config will be generated by events")
class TestProfileConfigUpdater(unittest.TestCase):
def setUp(self):
self.config = dict(CONFIG)
Expand Down

0 comments on commit 8968755

Please sign in to comment.