remove unnecessary argument encoding from bytes.decode() and str.encode()
the encoding parameter defaults to utf-8, so it's not needed
This commit is contained in:
@@ -215,7 +215,7 @@ async def test_api_payment_with_key(invoice, inkey_headers_from):
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_invoice_with_description_hash(client, inkey_headers_to):
|
||||
data = await get_random_invoice_data()
|
||||
descr_hash = hashlib.sha256("asdasdasd".encode("utf-8")).hexdigest()
|
||||
descr_hash = hashlib.sha256("asdasdasd".encode()).hexdigest()
|
||||
data["description_hash"] = descr_hash
|
||||
|
||||
response = await client.post(
|
||||
@@ -232,8 +232,8 @@ async def test_create_invoice_with_description_hash(client, inkey_headers_to):
|
||||
@pytest.mark.asyncio
|
||||
async def test_create_invoice_with_unhashed_description(client, inkey_headers_to):
|
||||
data = await get_random_invoice_data()
|
||||
descr_hash = hashlib.sha256("asdasdasd".encode("utf-8")).hexdigest()
|
||||
data["unhashed_description"] = "asdasdasd".encode("utf-8").hex()
|
||||
descr_hash = hashlib.sha256("asdasdasd".encode()).hexdigest()
|
||||
data["unhashed_description"] = "asdasdasd".encode().hex()
|
||||
|
||||
response = await client.post(
|
||||
"/api/v1/payments", json=data, headers=inkey_headers_to
|
||||
|
||||
Reference in New Issue
Block a user