from pytest import fixture

from iamport import Iamport

DEFAULT_TEST_IMP_KEY = 'imp_apikey'
DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O'
                           'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f')


def pytest_addoption(parser):
    parser.addoption('--imp-key', default=DEFAULT_TEST_IMP_KEY,
                     help='iamport client key for testing '
                          '[default: %default]')
    parser.addoption('--imp-secret', default=DEFAULT_TEST_IMP_SECRET,
                     help='iamport secret key for testing '
                          '[default: %default]')


@fixture
def iamport(request):
    imp_key = request.config.getoption('--imp-key')
    imp_secret = request.config.getoption('--imp-secret')
    return Iamport(imp_key=imp_key, imp_secret=imp_secret)

from pytest import fixture

from iamport import Iamport


DEFAULT_TEST_IMP_KEY = 'imp_apikey'
DEFAULT_TEST_IMP_SECRET = (
    'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b'
    'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f'
)


def pytest_addoption(parser):
    parser.addoption(
        '--imp-key', 
        default=DEFAULT_TEST_IMP_KEY,
        help='iamport client key for testing '
        '[default: %(default)s]'
    )
    parser.addoption(
        '--imp-secret', 
        default=DEFAULT_TEST_IMP_SECRET,
        help='iamport secret key for testing '
        '[default: %(default)s]'
    )


@fixture
def iamport(request):
    imp_key = request.config.getoption('--imp-key')
    imp_secret = request.config.getoption('--imp-secret')
    return Iamport(imp_key=imp_key, imp_secret=imp_secret)

Change %default to %(default)s for removing warning
Change %default to %(default)s for removing warning

  from pytest import fixture
  
  from iamport import Iamport
  
+ 
  DEFAULT_TEST_IMP_KEY = 'imp_apikey'
- DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O'
-                            'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f')
+ DEFAULT_TEST_IMP_SECRET = (
+     'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b'
+     'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f'
+ )
  
  
  def pytest_addoption(parser):
-     parser.addoption('--imp-key', default=DEFAULT_TEST_IMP_KEY,
+     parser.addoption(
+         '--imp-key', 
+         default=DEFAULT_TEST_IMP_KEY,
-                      help='iamport client key for testing '
+         help='iamport client key for testing '
-                           '[default: %default]')
-     parser.addoption('--imp-secret', default=DEFAULT_TEST_IMP_SECRET,
+         '[default: %(default)s]'
+     )
+     parser.addoption(
+         '--imp-secret', 
+         default=DEFAULT_TEST_IMP_SECRET,
-                      help='iamport secret key for testing '
+         help='iamport secret key for testing '
-                           '[default: %default]')
+         '[default: %(default)s]'
+     )
  
  
  @fixture
  def iamport(request):
      imp_key = request.config.getoption('--imp-key')
      imp_secret = request.config.getoption('--imp-secret')
      return Iamport(imp_key=imp_key, imp_secret=imp_secret)
  
Change %default to %(default)s for removing warning
## Code Before:
from pytest import fixture

from iamport import Iamport

DEFAULT_TEST_IMP_KEY = 'imp_apikey'
DEFAULT_TEST_IMP_SECRET = ('ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6bkA5lamv9O'
                           'qDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f')


def pytest_addoption(parser):
    parser.addoption('--imp-key', default=DEFAULT_TEST_IMP_KEY,
                     help='iamport client key for testing '
                          '[default: %default]')
    parser.addoption('--imp-secret', default=DEFAULT_TEST_IMP_SECRET,
                     help='iamport secret key for testing '
                          '[default: %default]')


@fixture
def iamport(request):
    imp_key = request.config.getoption('--imp-key')
    imp_secret = request.config.getoption('--imp-secret')
    return Iamport(imp_key=imp_key, imp_secret=imp_secret)

## Instruction:
Change %default to %(default)s for removing warning
## Code After:
from pytest import fixture

from iamport import Iamport


DEFAULT_TEST_IMP_KEY = 'imp_apikey'
DEFAULT_TEST_IMP_SECRET = (
    'ekKoeW8RyKuT0zgaZsUtXXTLQ4AhPFW3ZGseDA6b'
    'kA5lamv9OqDMnxyeB9wqOsuO9W3Mx9YSJ4dTqJ3f'
)


def pytest_addoption(parser):
    parser.addoption(
        '--imp-key', 
        default=DEFAULT_TEST_IMP_KEY,
        help='iamport client key for testing '
        '[default: %(default)s]'
    )
    parser.addoption(
        '--imp-secret', 
        default=DEFAULT_TEST_IMP_SECRET,
        help='iamport secret key for testing '
        '[default: %(default)s]'
    )


@fixture
def iamport(request):
    imp_key = request.config.getoption('--imp-key')
    imp_secret = request.config.getoption('--imp-secret')
    return Iamport(imp_key=imp_key, imp_secret=imp_secret)
