Skip to content

Commit d3ad049

Browse files
committed
still developing 178
1 parent 9aeb5af commit d3ad049

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

bin/user/MQTTSubscribe.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,8 +2628,8 @@ def __init__(self, engine, config_dict):
26282628
self.cache = RecordCache(self.logger)
26292629

26302630
# ToDo: Remove when issue 178 is complete
2631-
# archive_dict = config_dict.get('StdArchive', {})
2632-
# record_generation = archive_dict.get('record_generation', "none").lower()
2631+
archive_dict = config_dict.get('StdArchive', {})
2632+
record_generation = archive_dict.get('record_generation', "none").lower()
26332633

26342634
if self.binding not in ('loop', 'archive'):
26352635
raise ValueError(MQTTSubscribeService.msgX[29003].format(binding=self.binding))
@@ -2641,8 +2641,8 @@ def __init__(self, engine, config_dict):
26412641
self.bind(weewx.NEW_LOOP_PACKET, self.new_loop_packet)
26422642

26432643
# ToDo: Remove when issue 178 is complete
2644-
# if self.subscriber.cached_fields and record_generation != 'software' and self.binding == 'loop':
2645-
# raise ValueError(MQTTSubscribeService.msgX[29004].format(record_generation=record_generation))
2644+
if self.subscriber.cached_fields and record_generation != 'software' and self.binding == 'loop':
2645+
raise ValueError(MQTTSubscribeService.msgX[29004].format(record_generation=record_generation))
26462646

26472647
def shutDown(self): # need to override parent - pylint: disable=invalid-name
26482648
"""Run when an engine shutdown is requested."""

bin/user/tests/e2e/test_record_cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def random_string(length=32):
7878
7979
""" # noqa
8080

81-
# @unittest.skip("Enable when issue 178 is completed.")
81+
@unittest.skip("Enable when issue 178 is completed.")
8282
class test_record_cache(unittest.TestCase):
8383
def test_new_loop_packet(self):
8484
with mock.patch('user.MQTTSubscribe.RecordCache') as mock_cache:

bin/user/tests/unit/test_MQTTSubscribeService.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def test_caching_valid_software_generation(self):
150150

151151
user.MQTTSubscribe.MQTTSubscribeService(mock_StdEngine, config_dict)
152152

153-
@unittest.skip("Skipping while developing 178. Remove when released. Run in 'production' code.")
153+
# @unittest.skip("Skipping while developing 178. Remove when released. Run in 'production' code.")
154154
def test_caching_invalid_software_generation(self):
155155
mock_StdEngine = mock.Mock()
156156

@@ -296,7 +296,7 @@ def test_packet_is_in_past(self):
296296

297297
SUT.shutDown()
298298

299-
# @unittest.skip("Enable when issue 178 is completed (around line 2456)")
299+
@unittest.skip("Enable when issue 178 is completed (around line 2456)")
300300
def test_cached_field_in_packet(self):
301301
topic = random_string()
302302
current_time = int(time.time() + 0.5)

0 commit comments

Comments
 (0)