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:
Pavol Rusnak
2023-01-03 22:38:28 +01:00
parent c9b02a6470
commit 3d0c66f0f6
20 changed files with 31 additions and 33 deletions
+3 -3
View File
@@ -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