summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorErik Johnston <erik@matrix.org>2015-02-18 16:51:33 +0000
committerErik Johnston <erik@matrix.org>2015-02-18 16:52:04 +0000
commit5358966a878aa543659c10be09f4bf58b1568f2f (patch)
tree897422094208a187103a5d26e7e386d6cddf85e0 /tests
parentWhen computing git version run git commands in same dir as source files (diff)
downloadsynapse-5358966a878aa543659c10be09f4bf58b1568f2f.tar.xz
Use git aware version string in User-Agent and Server headers
Diffstat (limited to '')
-rw-r--r--tests/utils.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/tests/utils.py b/tests/utils.py
index 39895c739f..110b9f86b8 100644
--- a/tests/utils.py
+++ b/tests/utils.py
@@ -46,10 +46,16 @@ def setup_test_homeserver(name="test", datastore=None, config=None, **kargs):
     if datastore is None:
         db_pool = SQLiteMemoryDbPool()
         yield db_pool.prepare()
-        hs = HomeServer(name, db_pool=db_pool, config=config, **kargs)
+        hs = HomeServer(
+            name, db_pool=db_pool, config=config,
+            version_string="Synapse/tests",
+            **kargs
+        )
     else:
         hs = HomeServer(
-            name, db_pool=None, datastore=datastore, config=config, **kargs
+            name, db_pool=None, datastore=datastore, config=config,
+            version_string="Synapse/tests",
+            **kargs
         )
 
     defer.returnValue(hs)