diff options
author | louiz’ <louiz@louiz.org> | 2016-04-22 11:57:32 +0200 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2016-04-22 11:57:32 +0200 |
commit | ea35a12d5b20c50a1405a6eed5149f44aee59a9f (patch) | |
tree | 34d36fa749534b7b6fc9362c3563a07c7689393d | |
parent | 747f04ee6d104f466014a0b0e810ac9f855fa547 (diff) | |
download | biboumi-ea35a12d5b20c50a1405a6eed5149f44aee59a9f.tar.gz biboumi-ea35a12d5b20c50a1405a6eed5149f44aee59a9f.tar.bz2 biboumi-ea35a12d5b20c50a1405a6eed5149f44aee59a9f.tar.xz biboumi-ea35a12d5b20c50a1405a6eed5149f44aee59a9f.zip |
Each e2e scenario can provide its own config name
-rw-r--r-- | tests/end_to_end/__main__.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/end_to_end/__main__.py b/tests/end_to_end/__main__.py index 1043a95..c0c8542 100644 --- a/tests/end_to_end/__main__.py +++ b/tests/end_to_end/__main__.py @@ -128,13 +128,14 @@ class Scenario: etc """ - def __init__(self, name, steps): + def __init__(self, name, steps, conf="basic"): """ Steps is a list of 2-tuple: [(action, answer), (action, answer)] """ self.name = name self.steps = [] + self.conf = conf for elem in steps: if isinstance(elem, collections.Iterable): for step in elem: @@ -226,7 +227,7 @@ class BiboumiTest: filename=output_filename) with open("test.conf", "w") as fd: - fd.write(confs['basic']) + fd.write(confs[scenario.conf]) # Start the XMPP component and biboumi biboumi = BiboumiRunner(scenario.name, with_valgrind) @@ -254,7 +255,8 @@ class BiboumiTest: return not failed -confs = {'basic': +confs = { +'basic': """hostname=biboumi.localhost password=coucou db_name=biboumi.sqlite |