Skip to content

Commit

Permalink
Merge pull request #187 from KOSASIH/deepsource-transform-68e35612
Browse files Browse the repository at this point in the history
style: format code with Autopep8, Black, ClangFormat, dotnet-format, Go fmt, Gofumpt, Google Java Format, isort, Ktlint, PHP CS Fixer, Prettier, RuboCop, Ruff Formatter, Rustfmt, Scalafmt, StandardJS, StandardRB, swift-format and Yapf
  • Loading branch information
KOSASIH authored May 12, 2024
2 parents 2e90c62 + f76af5e commit 09f7dd3
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tests/test_block.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,22 @@
import unittest

from block import Block


class TestBlock(unittest.TestCase):
def test_create_block(self):
block = Block(1, "previous_hash", "data", 1234567890)
self.assertEqual(block.index, 1)
self.assertEqual(block.previous_hash, "previous_hash")
self.assertEqual(block.data, "data")
self.assertEqual(block.timestamp, 1234567890)
self.assertEqual(block.hash, "hash_value") # Replace with actual hash value
# Replace with actual hash value
self.assertEqual(block.hash, "hash_value")

def test_calculate_hash(self):
block = Block(1, "previous_hash", "data", 1234567890)
self.assertEqual(block.calculate_hash(), "hash_value") # Replace with actual hash value
# Replace with actual hash value
self.assertEqual(block.calculate_hash(), "hash_value")

def test_is_valid(self):
block = Block(1, "previous_hash", "data", 1234567890)
Expand Down

0 comments on commit 09f7dd3

Please sign in to comment.