This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from unittest.mock import patch | |
class MyDummyClass: | |
def test_dummy_function(self): | |
return "hello" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from unittest.mock import patch | |
class MyDummyClass: | |
def __init__(self): | |
self.my_dummy_attribute = "yey!" | |
def test_dummy_function(self): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pika | |
import sys | |
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) | |
channel = connection.channel() | |
channel.exchange_declare(exchange='direct_exchange', exchange_type='direct') | |
channel.queue_declare(queue='direct_queue', durable=True) | |
channel.queue_bind(exchange='direct_exchange', queue="direct_queue", routing_key="direct.routing.key") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pika | |
import time | |
connection = pika.BlockingConnection(pika.ConnectionParameters('localhost')) | |
channel = connection.channel() | |
channel.exchange_declare(exchange='direct_exchange', exchange_type='direct') | |
channel.queue_declare(queue='direct_queue', durable=True) | |
channel.queue_bind(exchange='direct_exchange', queue="direct_queue", routing_key="direct.routing.key") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
import json | |
import base64 | |
CUSTOMER_IO_SITE_ID='<SITE ID>' | |
CUSTOMER_IO_API_KEY='<API KEY>' | |
CUSTOMER_IO_CREDS = f'{CUSTOMER_IO_SITE_ID}:{CUSTOMER_IO_API_KEY}' | |
CUSTOMER_IO_ENCODED_CREDS = base64.b64encode(CUSTOMER_IO_CREDS.encode()).decode() | |
def send_verification_email(): |
OlderNewer