Skip to content

Commit

Permalink
Remove unnecessary commented out tests
Browse files Browse the repository at this point in the history
Signed-off-by: Adam.Dybbroe <a000680@c22526.ad.smhi.se>
  • Loading branch information
Adam.Dybbroe committed Apr 17, 2024
1 parent bd96a5d commit 8c8ed37
Showing 1 changed file with 0 additions and 43 deletions.
43 changes: 0 additions & 43 deletions activefires_pp/tests/test_messaging.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,49 +45,6 @@ def get_fake_publisher(portnumber=1979):
return create_publisher_from_dict_config(dict(port=portnumber, nameservers=False))


# @pytest.fixture(scope='session')
# @patch('os.path.exists')
# @patch('socket.gethostname')
# @patch('activefires_pp.post_processing.read_config')
# @patch('activefires_pp.post_processing.ActiveFiresPostprocessing._setup_and_start_communication')
# def fake_af_instance(setup_comm, get_config, gethostname, path_exists):

# get_config.return_value = CONFIG_EXAMPLE
# gethostname.return_value = "my.host.name"
# path_exists.return_value = True

# myconfigfile = "/my/config/file/path"
# myborders_file = "/my/shape/file/with/country/borders"
# mymask_file = "/my/shape/file/with/polygons/to/filter/out"

# afpp = ActiveFiresPostprocessing(myconfigfile, myborders_file, mymask_file)
# afpp.publisher = get_fake_publisher()
# afpp.publisher.start()

# return afpp


# class TestCheckMessaging:

# @pytest.fixture(autouse=True)
# def setup_method(self, fake_af_instance):
# self.afpp = fake_af_instance

# def test_check_incoming_message_nc_file_exists(self):
# input_msg = Message.decode(rawstr=TEST_MSG)

# with patched_publisher() as published_messages:
# result = self.afpp.check_incoming_message_and_get_filename(input_msg)

# assert result is None
# assert len(published_messages) == 2
# assert 'No fire detections for this granule' in published_messages[0]
# assert 'No fire detections for this granule' in published_messages[1]
# assert 'VIIRS/L2/Fires/PP/National' in published_messages[0]
# assert 'VIIRS/L2/Fires/PP/Regional' in published_messages[1]
# self.afpp.publisher.stop()


@patch('os.path.exists')
@patch('socket.gethostname')
@patch('activefires_pp.post_processing.ActiveFiresPostprocessing._setup_and_start_communication')
Expand Down

0 comments on commit 8c8ed37

Please sign in to comment.