AWS_S3_URL = AWS_S3_URLS['dev'] # Nets test environment configuration NETS_REGISTER_URL = "https://test.epayment.nets.eu/Netaxept/Register.aspx" NETS_TERMINAL_URL = "https://test.epayment.nets.eu/Terminal/default.aspx" NETS_PROCESS_URL = "https://test.epayment.nets.eu/Netaxept/Process.aspx" NETS_QUERY_URL = "https://test.epayment.nets.eu/Netaxept/Query.aspx" NETS_TOKEN = secrets['NETS_TOKEN_TEST'] # Unset DIBS settings, consider replacing with test values DIBS_MERCHANT_ID = 0 DIBS_HMAC_KEY = "" # Stripe test environment tokens STRIPE_TOKEN = STRIPE['tokens']['test'] # Raven DSN RAVEN_CONFIG['dsn'] = secrets.get('RAVEN_DSN_STAGING') # # Custom settings # # Apply Turbasen dev environment import turbasen turbasen.configure(ENDPOINT_URL='https://dev.nasjonalturbase.no/') # Focus web services for test server FOCUS_WSDL_URL = secrets['FOCUS_WSDL_URL_TEST'] FOCUS_WSDL_TOKEN = secrets['FOCUS_WSDL_TOKEN_TEST']
SMS_URL = "http://admin.intouch.no/smsgateway/sendSms?sender=DNT&targetNumbers=%s&sms=%s" # noqa # DNT administrations current public IP address (for memberservice) SMS_RESTRICTION_WHITELIST = ['212.71.74.98'] # Fjelltreffen # How long fjelltreffen-annonser are shown after creation FJELLTREFFEN_ANNONSE_RETENTION_DAYS = 90 # Age queries are rounded to these values FJELLTREFFEN_AGE_LIMITS = [18, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75, 80] FJELLTREFFEN_AGE_LIMIT = min(FJELLTREFFEN_AGE_LIMITS) FJELLTREFFEN_REPORT_EMAIL = 'Fjelltreffen <*****@*****.**>' FJELLTREFFEN_BULK_COUNT = 20 # Annonser to load when a user requests more FJELLTREFFEN_IMAGE_THUMB_SIZE = 150 # Max pixel width and/or height # Configure Turbasen turbasen.configure(API_KEY=secrets.get('TURBASEN_API_KEY')) # Verdandi VERDANDI_BASE_URL = 'https://sjekkut.app.dnt.no/api/v3' VERDANDI_API_TOKEN = secrets.get('VERDANDI_API_TOKEN') # Montis API endpoint DNTOSLO_MONTIS_API_URL = "https://booking.dntoslo.no/api" DNTOSLO_MONTIS_API_KEY = secrets.get('MONTIS_API_KEY') # base64 # Emails to DNT Medlemsservice MEMBERSERVICE_EMAIL = 'DNT Medlemsservice <*****@*****.**>' # Membership business rules MEMBERSHIP = { # Age categories; a member's age is the age they are by the end of the
def setUp(self): turbasen.configure(ENDPOINT_URL='https://dev.nasjonalturbase.no') self.objects = ObjectsFixture()
from sherpa.conf.cron import * elif CONFIGURATION == 'dev': if IS_API: from sherpa.conf.dev_api import * else: from sherpa.conf.dev import * # Override with private development settings if specified try: if IS_API: from sherpa.conf.private_api import * else: from sherpa.conf.private import * except ImportError: pass # Configure turbasen # Do imports *after* settings have been set from django.core.cache import cache import turbasen from core.turbasen import log_object_request, log_list_request turbasen.configure(LIMIT=50, CACHE=cache) turbasen.handle_event('api.get_object', log_object_request) turbasen.handle_event('api.get_objects', log_list_request) # Replace Django's logging configuration completely by disabling it and manually setting our log configuration # See http://stackoverflow.com/a/22336174/302484 import logging.config logging.config.dictConfig(LOGGING) LOGGING_CONFIG = None
def test_configure(self): turbasen.configure( LIMIT=30, ) self.assertEqual(turbasen.settings.Settings.LIMIT, 30)