mirror of
https://github.com/dh1tw/pyhamtools.git
synced 2026-01-28 03:04:20 +01:00
changed to ENV variables for testing with clublog API & QRZ.com credentials
This commit is contained in:
parent
dabc500795
commit
1351a5a995
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,2 +1,3 @@
|
|||
docs/build
|
||||
settings.json
|
||||
apikeysrc
|
||||
|
|
@ -1,6 +1,5 @@
|
|||
language: python
|
||||
python:
|
||||
- "2.6"
|
||||
- "2.7"
|
||||
- "3.3"
|
||||
- "3.4"
|
||||
|
|
|
|||
|
|
@ -1,12 +1,22 @@
|
|||
import pytest
|
||||
import tempfile
|
||||
import os
|
||||
import logging
|
||||
|
||||
|
||||
from .apikey import APIKEY, QRZ_USERNAME, QRZ_PWD
|
||||
from pyhamtools import LookupLib
|
||||
from pyhamtools import Callinfo
|
||||
|
||||
APIKEY = ""
|
||||
QRZ_USERNAME = ""
|
||||
QRZ_PWD = ""
|
||||
|
||||
try:
|
||||
APIKEY = str(os.environ['CLUBLOG_APIKEY'])
|
||||
QRZ_USERNAME = str(os.environ['QRZ_USERNAME'])
|
||||
QRZ_PWD = str(os.environ['QRZ_PWD'])
|
||||
|
||||
except Exception as ex:
|
||||
print("WARNING: Environment variables with API keys not set; some tests will be skipped")
|
||||
|
||||
@pytest.fixture(scope="session", params=["a", "", 12.5, -5, {"foo" : "bar"}, [5, "foo"]])
|
||||
def fixNonUnsignedInteger(request):
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
import os
|
||||
|
||||
import pytest
|
||||
from datetime import datetime
|
||||
|
||||
|
||||
from .apikey import QRZ_USERNAME, QRZ_PWD
|
||||
from pyhamtools.lookuplib import LookupLib
|
||||
from pyhamtools.exceptions import APIKeyMissingError
|
||||
from pyhamtools.consts import LookupConventions as const
|
||||
|
|
@ -10,10 +10,15 @@ from pyhamtools.consts import LookupConventions as const
|
|||
import pytz
|
||||
UTC = pytz.UTC
|
||||
|
||||
|
||||
try:
|
||||
QRZ_USERNAME = str(os.environ['QRZ_USERNAME'])
|
||||
QRZ_PWD = str(os.environ['QRZ_PWD'])
|
||||
except Exception:
|
||||
pytestmark = pytest.mark.skip("Environment variables with QRZ.com credentials not set")
|
||||
|
||||
#Fixtures
|
||||
#===========================================================
|
||||
|
||||
|
||||
response_XX1XX = {
|
||||
u'addr2': u'Not QSL',
|
||||
u'adif': 0,
|
||||
|
|
|
|||
Loading…
Reference in a new issue