Ppchelko has uploaded a new change for review. ( 
https://gerrit.wikimedia.org/r/349277 )

Change subject: Bugfix: Return the full topic config from the lookup method.
......................................................................

Bugfix: Return the full topic config from the lookup method.

Change-Id: I2cf1aad5c1f16d9aed20a0de22a8e766d9731b10
---
M eventlogging/topic.py
M tests/test_topic.py
2 files changed, 3 insertions(+), 3 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/eventlogging 
refs/changes/77/349277/1

diff --git a/eventlogging/topic.py b/eventlogging/topic.py
index 3ed4880..aa2a8f4 100644
--- a/eventlogging/topic.py
+++ b/eventlogging/topic.py
@@ -49,7 +49,7 @@
     for topic_spec_name, topic_spec in topic_config.items():
         if re.match('^\/.+\/$', topic_spec_name) and 
re.match(topic_spec_name[1:-1], topic):
             topic_lookup_cache[topic] = topic_spec
-            return topic_spec['schema_name']
+            return topic_spec
     topic_lookup_cache[topic] = False
     return None
 
diff --git a/tests/test_topic.py b/tests/test_topic.py
index f40a678..22f25ff 100644
--- a/tests/test_topic.py
+++ b/tests/test_topic.py
@@ -87,11 +87,11 @@
 
         eventlogging.topic.update_topic_config(test_topic_config)
 
-        self.assertTrue(eventlogging.topic.is_topic_configured('regex.topic'))
-        self.assertFalse(eventlogging.topic.is_topic_configured('bla'))
         self.assertEqual(
             eventlogging.topic.schema_name_for_topic('regex.topic'),
             'regex.schema'
         )
+        self.assertTrue(eventlogging.topic.is_topic_configured('regex.topic'))
+        self.assertFalse(eventlogging.topic.is_topic_configured('bla'))
 
 

-- 
To view, visit https://gerrit.wikimedia.org/r/349277
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2cf1aad5c1f16d9aed20a0de22a8e766d9731b10
Gerrit-PatchSet: 1
Gerrit-Project: eventlogging
Gerrit-Branch: master
Gerrit-Owner: Ppchelko <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to