Last active
March 3, 2019 10:51
-
-
Save NMZivkovic/7fc3bae797487fb331a96b22555cdeb4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import unittest | |
from citadel import Citadel | |
from rick import Rick | |
from morty import Morty | |
class CitadelTests(unittest.TestCase): | |
def test_get_all_residents(self): | |
citadel = Citadel() | |
residents = citadel.get_all_residents() | |
self.assertCountEqual(residents, []) | |
def test_add_resident(self): | |
citadel = Citadel() | |
rick = Rick(111) | |
morty = Morty(111) | |
citadel.add_resident(rick) | |
citadel.add_resident(morty) | |
residents = citadel.get_all_residents() | |
self.assertEqual(residents[0], rick) | |
self.assertEqual(residents[1], morty) | |
if __name__ == '__main__': | |
unittest.main() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment