We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6bfc1e7 commit 99a92b4Copy full SHA for 99a92b4
account.py
@@ -7,4 +7,7 @@ def sub(x, y):
7
8
9
class Account:
10
- pass
+ def __init__(self, name):
11
+ self.name = name
12
+
13
accout_test.py
@@ -22,7 +22,7 @@ def test_that_can_sub(self):
22
23
class Account_Test(unittest.TestCase):
24
def test_that_account_can_be_created(self):
25
- account1 = account.Account()
+ account1 = account.Account("tobi")
26
27
self.assertIsNotNone(account1)
28
self.assertIsInstance(account1, account.Account)
@@ -33,7 +33,9 @@ def test_that_account_has_a_name(self):
33
WHEN:
34
THEN:
35
"""
36
-
37
+ name = account1.name
38
+ self.assertEqual("tobi", name)
39
40
41
if __name__ == '__main__':
0 commit comments