def test_delete_wallet_400(self): payload = { "user_handle": '', } response = Wallet.deleteWallet(app, payload, eth_private_key) self.assertFalse(response["success"])
def test_update_wallet_400(self): payload = { "user_handle": "", "nickname": "" } response = Wallet.update_wallet(app, payload, eth_private_key) self.assertFalse(response.get('success')) self.assertEqual(response.get('status_code'), 400) self.assertEqual(response.get('status'), 'FAILURE')
def test_update_wallet_403(self): payload = { "user_handle": user_handle, "nickname": "wallet_python_updated", "default": True } response = Wallet.update_wallet(app, payload, '') self.assertFalse(response.get('success')) self.assertEqual(response.get('status_code'), 403) self.assertEqual(response.get('status'), 'FAILURE')
def test_register_wallet_200(self): payload = { "user_handle": user_handle, "wallet_verification_signature": verification_signature, "wallet": { "blockchain_address": wallet_address, "blockchain_network": "ETH", "nickname": "wallet_python_new" } } response = Wallet.registerWallet(app, payload, eth_private_key) self.assertTrue(response["success"])
def test_register_wallet_403(self): payload = { "user_handle": user_handle, "wallet_verification_signature": "", "wallet": { "blockchain_address": wallet_address_signed_verified, "blockchain_network": "ETH", "nickname": "wallet_python", "default": True } } response = Wallet.registerWallet(app, payload, eth_private_key) self.assertFalse(response["success"])
def test_update_wallet_200(self): nickname = 'wallet_python_updated' payload = { "user_handle": user_handle, "nickname": nickname, "default": True } response = Wallet.update_wallet(app, payload, eth_private_key) self.assertTrue(response.get('success')) self.assertEqual(response.get('status_code'), 200) self.assertEqual(response.get('status'), 'SUCCESS') self.assertIsNotNone(response.get('wallet')) self.assertEqual(response.get('wallet').get( 'nickname'), nickname) self.assertTrue(response.get('wallet').get('default'))
def test_delete_wallet_200(self): payload = {"user_handle": user_handle} response = Wallet.deleteWallet(app, payload, wallet_private_key) self.assertTrue(response["success"])
def test_delete_wallet_401(self): payload = {"user_handle": user_handle} response = Wallet.deleteWallet(app, payload, '') self.assertFalse(response["success"])