mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-07-22 01:58:41 -04:00
Migrate all tests to use the dict-based config format instead of hanging items off HomeserverConfig (#5171)
This commit is contained in:
parent
5a4b328f52
commit
df2ebd75d3
23 changed files with 238 additions and 201 deletions
|
@ -42,15 +42,18 @@ class ConsentResourceTestCase(unittest.HomeserverTestCase):
|
|||
def make_homeserver(self, reactor, clock):
|
||||
|
||||
config = self.default_config()
|
||||
config.user_consent_version = "1"
|
||||
config.public_baseurl = ""
|
||||
config.form_secret = "123abc"
|
||||
config["public_baseurl"] = "aaaa"
|
||||
config["form_secret"] = "123abc"
|
||||
|
||||
# Make some temporary templates...
|
||||
temp_consent_path = self.mktemp()
|
||||
os.mkdir(temp_consent_path)
|
||||
os.mkdir(os.path.join(temp_consent_path, 'en'))
|
||||
config.user_consent_template_dir = os.path.abspath(temp_consent_path)
|
||||
|
||||
config["user_consent"] = {
|
||||
"version": "1",
|
||||
"template_dir": os.path.abspath(temp_consent_path),
|
||||
}
|
||||
|
||||
with open(os.path.join(temp_consent_path, "en/1.html"), 'w') as f:
|
||||
f.write("{{version}},{{has_consented}}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue