# Path: tenable_io/config.py
# class TenableIOConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io', key)
# 
# Path: tests/config.py
# class TenableIOTestConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io-test', key)


import base64
import hashlib
import json
import requests
from time import sleep, time
from tenable_io.config import TenableIOConfig
from tests.config import TenableIOTestConfig



WAIT_TIMEOUT = 300
WAIT_INTERVAL = 10


def wait_until(expression, condition):
    value = expression()
    start_time = time()
    elapsed = 0
    while not condition(value) and elapsed <= WAIT_TIMEOUT:
        sleep(WAIT_INTERVAL)
        value = expression()
        elapsed = time() - start_time
    assert condition(value), u'Timeout waiting for a condition (%d seconds elapsed).' % elapsed
    return value


def upload_image(name, tag, vulnerable=False):


# Path: tenable_io/config.py
# class TenableIOConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io', key)
# 
# Path: tests/config.py
# class TenableIOTestConfig(object):
# 
#     @staticmethod
#     def get(key):
#         return config.get('tenable_io-test', key)


# Path: tests/integration/api/utils/utils.py
import base64
import hashlib
import json
import requests
from time import sleep, time
from tenable_io.config import TenableIOConfig
from tests.config import TenableIOTestConfig




WAIT_TIMEOUT = 300
WAIT_INTERVAL = 10


def wait_until(expression, condition):
    value = expression()
    start_time = time()
    elapsed = 0
    while not condition(value) and elapsed <= WAIT_TIMEOUT:
        sleep(WAIT_INTERVAL)
        value = expression()
        elapsed = time() - start_time
    assert condition(value), u'Timeout waiting for a condition (%d seconds elapsed).' % elapsed
    return value


def upload_image(name, tag, vulnerable=False):


    host = TenableIOTestConfig.get('registry_host')