# Path: wsse/settings.py
# TIMESTAMP_DURATION = 2 * 60 * 60
# DRIFT_OFFSET = 2 * 60
# TIMESTAMP_FORMATS = [
# 	'%Y-%m-%dT%H:%M:%SZ',    # ISO 8601 in UTC (Z specifies 0 offset)
# 	'%Y-%m-%dT%H:%M:%S',     # ISO 8601 without timezone - assumed to be UTC
# 	'%Y-%m-%dT%H:%M:%S.%fZ', # ISO 8601 with microseconds in UTC
# 	'%Y-%m-%dT%H:%M:%S.%f',  # ISO 8601 with microseconds (assumed UTC)
# 	'%Y-%m-%dT%H:%M:%S%z',   # ISO 8601 with UTC offset
# 	'%Y-%m-%dT%H:%M:%S.%f%z' # ISO 8601 with microseconds and UTC offset
# 	]
# NONCE_LENGTH = 64
# NONCE_STORE = 'wsse.server.default.store.SQLiteNonceStore'
# NONCE_STORE_ARGS = (':memory:',)
# REQUEST_HEADER = 'X-WSSE'
# SECURITY_CHECK_NONCE = True
# SECURITY_CHECK_TIMESTAMP = True
# ALLOWED_DIGEST_ALGORITHMS = ['SHA256']
# PROHIBITED_DIGEST_ALGORITHMS = ['SHA1', 'MD5']
# SECRET_KEY_LENGTH = 64
# LOGGER_NAME = 'wsse'
# 
# Path: wsse/utc.py
# class _UTC(datetime.tzinfo):
#   def utcoffset(self, dt):
#   def tzname(self, dt):
#   def dst(self, dt):
# 
# Path: wsse/server/default/store.py
# class SQLiteNonceStore(object):
# 	def __init__(self, connection_url, table = 'nonce_store'):
# 	def open(self):
# 	def close(self):
# 	def __transaction(self):
# 	def __setup(self):
# 	def _clear(self):
# 	def add_nonce(self, nonce, timestamp = None):
# 	def has_nonce(self, nonce):
# 	def clean_expired_nonces(self):


from unittest import TestCase
from wsse import settings, utc
from wsse.server.default import store
import datetime
# wsse/server/default/tests/test_store.py
# coding=utf-8
# pywsse
# Authors: Rushy Panchal, Naphat Sanguansin, Adam Libresco, Jérémie Lumbroso
# Date: August 30th, 2016
# Description: Test default nonce store, SQLiteNonceStore.



class TestSQLiteNonceStore(TestCase):
	'''
	Test the `store.SQLiteNonceStore` class.
	'''
	@classmethod
	def setUpClass(cls):
		'''
		Set up the class for running tests.
		'''
		cls.store = store.SQLiteNonceStore(':memory:', 'nonce_store')

# Path: wsse/settings.py
# TIMESTAMP_DURATION = 2 * 60 * 60
# DRIFT_OFFSET = 2 * 60
# TIMESTAMP_FORMATS = [
# 	'%Y-%m-%dT%H:%M:%SZ',    # ISO 8601 in UTC (Z specifies 0 offset)
# 	'%Y-%m-%dT%H:%M:%S',     # ISO 8601 without timezone - assumed to be UTC
# 	'%Y-%m-%dT%H:%M:%S.%fZ', # ISO 8601 with microseconds in UTC
# 	'%Y-%m-%dT%H:%M:%S.%f',  # ISO 8601 with microseconds (assumed UTC)
# 	'%Y-%m-%dT%H:%M:%S%z',   # ISO 8601 with UTC offset
# 	'%Y-%m-%dT%H:%M:%S.%f%z' # ISO 8601 with microseconds and UTC offset
# 	]
# NONCE_LENGTH = 64
# NONCE_STORE = 'wsse.server.default.store.SQLiteNonceStore'
# NONCE_STORE_ARGS = (':memory:',)
# REQUEST_HEADER = 'X-WSSE'
# SECURITY_CHECK_NONCE = True
# SECURITY_CHECK_TIMESTAMP = True
# ALLOWED_DIGEST_ALGORITHMS = ['SHA256']
# PROHIBITED_DIGEST_ALGORITHMS = ['SHA1', 'MD5']
# SECRET_KEY_LENGTH = 64
# LOGGER_NAME = 'wsse'
# 
# Path: wsse/utc.py
# class _UTC(datetime.tzinfo):
#   def utcoffset(self, dt):
#   def tzname(self, dt):
#   def dst(self, dt):
# 
# Path: wsse/server/default/store.py
# class SQLiteNonceStore(object):
# 	def __init__(self, connection_url, table = 'nonce_store'):
# 	def open(self):
# 	def close(self):
# 	def __transaction(self):
# 	def __setup(self):
# 	def _clear(self):
# 	def add_nonce(self, nonce, timestamp = None):
# 	def has_nonce(self, nonce):
# 	def clean_expired_nonces(self):


# Path: wsse/server/default/tests/test_store.py
from unittest import TestCase
from wsse import settings, utc
from wsse.server.default import store
import datetime

# wsse/server/default/tests/test_store.py
# coding=utf-8
# pywsse
# Authors: Rushy Panchal, Naphat Sanguansin, Adam Libresco, Jérémie Lumbroso
# Date: August 30th, 2016
# Description: Test default nonce store, SQLiteNonceStore.



class TestSQLiteNonceStore(TestCase):
	'''
	Test the `store.SQLiteNonceStore` class.
	'''
	@classmethod
	def setUpClass(cls):
		'''
		Set up the class for running tests.
		'''
		cls.store = store.SQLiteNonceStore(':memory:', 'nonce_store')

		cls.db = cls.store.db