From 102406dd357ba8a14c85d32c99ea16d05bd9b521 Mon Sep 17 00:00:00 2001 From: Sylvain Bellemare Date: Thu, 16 Mar 2017 14:05:09 +0100 Subject: [PATCH] Add fixtures for alice, bob, and carol --- tests/conftest.py | 48 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/tests/conftest.py b/tests/conftest.py index 9612f38b..e943d0a9 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -223,6 +223,54 @@ def user2_pk(): return USER2_PK +@pytest.fixture +def alice(): + from bigchaindb.common.crypto import generate_key_pair + return generate_key_pair() + + +@pytest.fixture +def alice_privkey(alice): + return alice.private_key + + +@pytest.fixture +def alice_pubkey(alice): + return alice.public_key + + +@pytest.fixture +def bob(): + from bigchaindb.common.crypto import generate_key_pair + return generate_key_pair() + + +@pytest.fixture +def bob_privkey(bob): + return bob.private_key + + +@pytest.fixture +def bob_pubkey(carol): + return bob.public_key + + +@pytest.fixture +def carol(): + from bigchaindb.common.crypto import generate_key_pair + return generate_key_pair() + + +@pytest.fixture +def carol_privkey(carol): + return carol.private_key + + +@pytest.fixture +def carol_pubkey(carol): + return carol.public_key + + @pytest.fixture def b(): from bigchaindb import Bigchain