Use pre-generated keys for python integration tests

This changes the AccountMaker to use pre-generated keys when
available, speeding up test runs.

As a side-effect we no longer need to compile the integration tests in
release mode with debug symbols.  Losing debug symbols (-g) means
cargo no longer wants to recompile everything all the time too.

Tested locally and seems to works.
This commit is contained in:
Floris Bruynooghe
2020-02-06 23:24:09 +01:00
committed by Alexander Krotov
parent 0864e640ed
commit 515c753d11
6 changed files with 39 additions and 26 deletions

View File

@@ -1,5 +1,4 @@
from __future__ import print_function
import py
import pytest
import os
import queue
@@ -7,17 +6,9 @@ import time
from deltachat import const, Account
from deltachat.message import Message
from datetime import datetime, timedelta
from conftest import wait_configuration_progress, wait_successful_IMAP_SMTP_connection, wait_securejoin_inviter_progress
@pytest.fixture
def datadir():
"""The py.path.local object of the test-data/ directory."""
for path in reversed(py.path.local(__file__).parts()):
datadir = path.join('test-data')
if datadir.isdir():
return datadir
pytest.skip('test-data directory not found')
from conftest import (wait_configuration_progress,
wait_successful_IMAP_SMTP_connection,
wait_securejoin_inviter_progress)
class TestOfflineAccountBasic:
@@ -38,8 +29,8 @@ class TestOfflineAccountBasic:
def test_preconfigure_keypair(self, acfactory, datadir):
ac = acfactory.get_unconfigured_account()
ac._preconfigure_keypair("alice@example.com",
datadir.join('key/alice-public.asc').read(),
datadir.join('key/alice-secret.asc').read())
datadir.join("key/alice-public.asc").read(),
datadir.join("key/alice-secret.asc").read())
def test_getinfo(self, acfactory):
ac1 = acfactory.get_unconfigured_account()