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
class TestAccountService: | |
def test_transfer_money_with_insufficient_balance(self, enable_in_app_notifications, mock): | |
mock_send_in_app_notification = mock('app.notifications.in_app.send') | |
mock_send_email = mock('app.email.send') | |
receiver_account = AccountFactory() | |
sender_account = AccountFactory(balance=0) | |
with database.managed_session() as session: |
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
from bdd import ( | |
case, | |
expect, | |
when, | |
) | |
class TestAccountService: | |
def test_transfer_money_with_insufficient_balance(self, enable_in_app_notifications, mock): |
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
# current_timestamp = str(int(datetime.datetime.now().timestamp())) | |
# url = f'https://api.arkhamintelligence.com/portfolio/entity/{entity}' | |
def generate_headers(current_timestamp, host): | |
API_HOST = 'https://api.arkhamintelligence.com' | |
CLIENT_KEY = 'gh67j345kl6hj5k432' | |
path = host.replace(API_HOST, '').split('?')[0] | |
hash_ = hashlib.sha256(f"{path}:{current_timestamp}:{CLIENT_KEY}".encode()).hexdigest() | |
x_payload = hashlib.sha256(f"{CLIENT_KEY}:{hash_}".encode()).hexdigest() |
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
# That is how the tests might look in pytest/unittest. | |
# Basically each case is written by own test function. | |
# Each function has a documentation describing the test case. | |
# Basically, a lot of stuff is repeated: | |
# - name variable | |
# - surname variable | |
# - documentation (at least, cases) | |
# - asserts sometimes or most of the time | |
# More cases we have (usually we have a lot), more duplication thing the test class has | |
# as well as the size, etc. |
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
<v-card> | |
<template v-for="(comment, index) in comments"> | |
<v-list-item> | |
<v-list-item-avatar> | |
<img :src="getUserAvatarUrl(comment.user.username)"> | |
</v-list-item-avatar> | |
</v-list-item> | |
</template> | |
</v-list> | |
</v-card> |
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
wget https://github.com/EOSIO/eos/releases/download/v1.7.4/eosio_1.7.4-1-ubuntu-16.04_amd64.deb && \ | |
sudo apt install ./eosio_1.7.4-1-ubuntu-16.04_amd64.deb && \ | |
mkdir contracts && cd contracts && \ | |
keosd --http-server-address=0.0.0.0:9559 & | |
nodeos -e -p eosio --plugin eosio::producer_plugin --plugin eosio::chain_api_plugin --plugin eosio::http_plugin \ | |
--plugin eosio::history_plugin --plugin eosio::history_api_plugin --http-server-address=0.0.0.0:8888 \ | |
--access-control-allow-origin='*' --contracts-console --http-validate-host=false \ | |
--verbose-http-errors >> nodeos.log 2>&1 & |
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
#!/bin/bash | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ | |
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ | |
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \ | |
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \ | |
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \ | |
cd remme-core-$2 && \ | |
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \ | |
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \ |
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
#!/bin/bash | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ | |
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ | |
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \ | |
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \ | |
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \ | |
cd remme-core-$2 && \ | |
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \ | |
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \ |
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
#!/bin/bash | |
sudo apt-get install apt-transport-https ca-certificates curl software-properties-common make -y && \ | |
sudo sh -c "echo 'LC_ALL=en_US.UTF-8\nLANG=en_US.UTF-8' >> /etc/environment" && \ | |
echo "REMME_CORE_RELEASE=$2" >> ~/.bashrc && \ | |
echo "NODE_IP_ADDRESS=$1" >> ~/.bashrc && \ | |
cd /home/ && curl -L https://github.com/Remmeauth/remme-core/archive/v$2.tar.gz | sudo tar zx && \ | |
cd remme-core-$2 && \ | |
sudo -i sed -i "s@80@3333@" /home/remme-core-$2/docker/compose/admin.yml && \ | |
sudo -i sed -i "[email protected]@$1@" /home/remme-core-$2/config/network-config.env && \ |
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
[2019-05-20 16:50:35.236 DEBUG handler] Set policy : | |
name: "node_account_permissions_policy" | |
entries { | |
type: PERMIT_KEY | |
key: "037426e20b4ab14717d4483e2b56923a86b20a25ea8fdd1af2576de170b32768e1" | |
} | |
entries { | |
type: PERMIT_KEY | |
key: "03d1ec76ec167630a995bc4e6da52611eb4614ce5f2a4d7eae35467e7568ae56ca" | |
} |
NewerOlder