Skip to content

Commit

Permalink
Merge pull request #7 from andela-ydaniju/ft-fellow-staff-118011619
Browse files Browse the repository at this point in the history
create fellows model with tests
  • Loading branch information
Yusuf Daniju committed Apr 21, 2016
2 parents 56ca2cb + 234f489 commit 86a647e
Show file tree
Hide file tree
Showing 17 changed files with 74 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .coverage
Original file line number Diff line number Diff line change
@@ -1 +1 @@
!coverage.py: This is a private format, don't read it directly!{"lines": {"/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/pkg_resources/extern/__init__.py": [27, 28, 29], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/multiprocess.py": [224, 225, 226, 227, 231, 233, 234, 235, 238, 223], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/proxy.py": [30, 163, 164, 165, 168, 169, 170, 43, 45, 46, 47, 176, 177, 178, 57, 58, 59, 60, 61, 62, 63, 64, 78, 80, 81, 82, 83, 102, 103, 104, 110, 111, 112, 116, 117, 118], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/staff.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/loader.py": [522, 523, 540, 541, 542, 547, 550, 551, 559, 564, 566, 567, 569, 570, 79, 81, 82, 83, 84, 85, 86, 89, 90, 91, 92, 93, 94, 95, 97, 99, 105, 108, 109, 110, 112, 113, 114, 116, 119, 121, 122, 123, 128, 131, 134, 135, 143, 144, 145, 146, 147, 149, 150, 151, 154, 156, 157, 158, 159, 160, 161, 170, 177, 178, 179, 180, 181, 182, 183, 186, 196, 197, 200, 201, 209, 210, 211, 212, 314, 315, 316, 317, 321, 322, 323, 325, 326, 327, 328, 330, 331, 332, 333, 338, 340, 341, 343, 344, 345, 346, 347, 348, 349, 350, 353, 354, 356, 359, 369, 371, 374, 375, 378, 379, 404, 405, 406, 409, 410, 416, 417, 418, 420, 421, 428, 431, 432, 433, 473, 474, 475, 476, 481, 486, 487, 488, 493, 494], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/__main__.py": [1], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/errorclass.py": [148, 150, 151, 152, 153, 154], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/prof.py": [71, 74, 75, 76, 80, 81, 82, 83, 84, 57], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/__init__.py": [1], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/rednose.py": [384, 129, 130, 387, 133, 390, 385, 139, 140, 141, 144, 153, 154, 155, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 391, 373, 386, 219, 220, 223, 224, 225, 229, 230, 233, 234, 237, 371, 372, 254, 380, 126, 255], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/pyversion.py": [70, 136, 49, 50, 51, 52, 53, 54, 56, 58], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/doctests.py": [192, 193, 194, 195, 188, 189, 190, 191], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/suite.py": [539, 540, 543, 544, 545, 546, 547, 548, 551, 552, 554, 563, 564, 53, 567, 68, 79, 80, 81, 94, 95, 96, 97, 98, 103, 104, 105, 107, 113, 114, 148, 149, 150, 151, 153, 154, 155, 156, 157, 158, 173, 177, 201, 204, 205, 208, 209, 216, 217, 218, 224, 226, 227, 228, 269, 270, 274, 277, 278, 282, 283, 285, 286, 287, 288, 289, 290, 291, 292, 293, 297, 298, 301, 302, 303, 304, 308, 309, 310, 312, 52, 314, 315, 323, 324, 329, 330, 331, 337, 338, 339, 340, 341, 342, 313, 345, 346, 347, 348, 349, 350, 351, 356, 357, 358, 360, 361, 362, 364, 365, 366, 367, 368, 372, 373, 374, 394, 396, 397, 401, 402, 403, 404, 405, 406, 407, 418, 419, 420, 421, 422, 423, 424, 427, 435, 436, 441, 443, 445, 446, 447, 448, 451, 452, 453, 454, 457, 459, 460, 462, 463, 465, 466, 467, 471, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/importer.py": [128, 129, 130, 131, 132, 65, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 32, 161, 165, 166, 167, 40, 41, 42, 44, 45, 47, 30, 54, 59, 62, 53, 160, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 85, 86, 89, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 110, 111, 116, 117, 118, 119, 63, 126, 127], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/isolate.py": [61, 62], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/person.py": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/__init__.py": [1], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/person_unit_test.py": [1, 2, 4, 6, 7, 8, 10, 11, 12, 14], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/pkg_resources/_vendor/six.py": [185, 187], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/living_space.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/termstyle.py": [43, 44, 62, 63], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/office.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/cover.py": [164, 263, 173, 271, 182, 183], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/xunit.py": [192, 193, 191], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/context.py": [1, 2, 3, 5], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/manager.py": [128, 262, 263, 264, 265, 272, 273, 274, 149, 167, 166, 295, 168, 169, 301, 302, 177, 178, 184, 249, 88, 89, 93, 94, 95, 96, 99, 252, 106, 107, 111, 114, 123, 118, 105, 120, 121, 250, 251, 124, 253, 254], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/skip.py": [57, 59, 60, 61], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/debug.py": [40, 41, 42, 43], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/base.py": [98, 100, 101, 102], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/fellow.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/core.py": [65, 34, 36, 37, 50, 51, 55, 56, 59, 188, 61, 62, 193, 66, 199, 200, 201, 202, 203, 204, 205, 206, 207, 187, 60], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/selector.py": [129, 130, 131, 134, 135, 171, 68, 69, 162, 35, 37, 167, 40, 41, 42, 43, 44, 45, 174, 175, 176, 178, 179, 53, 54, 57, 187, 188, 191, 193, 194, 196, 197, 72, 73, 74, 76, 77, 80, 81, 163, 169, 222, 224, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 116, 117, 118, 119, 120, 121, 122, 123, 170, 126, 127], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/amity.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/deprecated.py": [40, 42, 43, 44], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/util.py": [320, 446, 662, 263, 520, 521, 266, 267, 140, 397, 270, 271, 272, 273, 274, 403, 276, 277, 278, 279, 408, 409, 410, 411, 312, 163, 164, 406, 470, 264, 306, 307, 308, 309, 310, 393, 184, 313, 187, 188, 189, 190, 191, 192, 321, 322, 195, 407, 471, 447, 311, 663, 337, 338, 339, 340, 398, 342, 343, 399, 479, 323, 481, 483, 484, 485, 486, 449, 404, 448, 660, 318, 502, 503, 504, 505, 506, 319, 405], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/testid.py": [137, 138, 142, 143, 144, 145, 148, 149, 150, 151, 154, 155], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/result.py": [38, 39, 40, 41, 43, 44], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/logcapture.py": [34, 38, 39, 40, 41, 44, 178, 179, 193, 194, 195, 196, 198, 199, 76, 204, 77, 78, 207, 80, 209, 86, 217, 79, 222, 208], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/capture.py": [64, 96, 98, 69, 102, 97, 58, 59, 101], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/failuredetail.py": [33, 35, 36], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/case.py": [128, 129, 130, 131, 132, 133, 140, 147, 148, 149, 151, 29, 33, 34, 36, 37, 38, 39, 40, 41, 42, 45, 59, 60, 64, 69, 70, 74, 99, 100, 101, 102, 103, 104]}}
!coverage.py: This is a private format, don't read it directly!{"lines": {"/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/pkg_resources/extern/__init__.py": [27, 28, 29], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/core.py": [65, 34, 36, 37, 50, 51, 55, 56, 59, 188, 61, 62, 193, 66, 199, 200, 201, 202, 203, 204, 205, 206, 207, 187, 60], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/multiprocess.py": [224, 225, 226, 227, 231, 233, 234, 235, 238, 223], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/pkg_resources/_vendor/six.py": [185, 187], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/staff.py": [1, 3, 4, 5, 7, 8, 9], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/loader.py": [522, 523, 540, 541, 542, 547, 550, 551, 559, 564, 566, 567, 569, 570, 79, 81, 82, 83, 84, 85, 86, 89, 90, 91, 92, 93, 94, 95, 97, 99, 105, 108, 109, 110, 112, 113, 114, 116, 119, 121, 122, 123, 128, 131, 134, 135, 143, 144, 145, 146, 147, 149, 150, 151, 154, 156, 157, 158, 159, 160, 161, 170, 177, 178, 179, 180, 181, 182, 183, 186, 196, 197, 200, 201, 209, 210, 211, 212, 314, 315, 316, 317, 321, 322, 323, 325, 326, 327, 328, 330, 331, 332, 333, 338, 340, 341, 343, 344, 345, 346, 347, 348, 349, 350, 353, 354, 356, 359, 369, 371, 374, 375, 378, 379, 404, 405, 406, 409, 410, 416, 417, 418, 420, 421, 428, 431, 432, 433, 473, 474, 475, 476, 481, 486, 487, 488, 493, 494], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/__main__.py": [1], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/errorclass.py": [148, 150, 151, 152, 153, 154], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/prof.py": [71, 74, 75, 76, 80, 81, 82, 83, 84, 57], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/__init__.py": [1], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/rednose.py": [384, 129, 130, 387, 133, 390, 385, 139, 140, 141, 144, 153, 154, 155, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 391, 373, 386, 219, 220, 223, 224, 225, 229, 230, 233, 234, 237, 371, 372, 254, 380, 126, 255], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/pyversion.py": [70, 136, 49, 50, 51, 52, 53, 54, 56, 58], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/doctests.py": [192, 193, 194, 195, 188, 189, 190, 191], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/suite.py": [539, 540, 543, 544, 545, 546, 547, 548, 551, 552, 554, 563, 564, 53, 567, 68, 79, 80, 81, 94, 95, 96, 97, 98, 103, 104, 105, 107, 113, 114, 148, 149, 150, 151, 153, 154, 155, 156, 157, 158, 173, 177, 201, 204, 205, 208, 209, 216, 217, 218, 224, 226, 227, 228, 269, 270, 274, 277, 278, 282, 283, 285, 286, 287, 288, 289, 290, 291, 292, 293, 297, 298, 301, 302, 303, 304, 308, 309, 310, 312, 52, 314, 315, 323, 324, 329, 330, 331, 337, 338, 339, 340, 341, 342, 313, 345, 346, 347, 348, 349, 350, 351, 356, 357, 358, 360, 361, 362, 364, 365, 366, 367, 368, 372, 373, 374, 394, 396, 397, 401, 402, 403, 404, 405, 406, 407, 418, 419, 420, 421, 422, 423, 424, 427, 435, 436, 441, 443, 445, 446, 447, 448, 451, 452, 453, 454, 457, 459, 460, 462, 463, 465, 466, 467, 471, 474, 475, 476, 477, 478, 479, 480, 481, 482, 483, 484, 485, 486], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/importer.py": [128, 129, 130, 131, 132, 65, 143, 144, 146, 147, 148, 149, 150, 151, 152, 153, 154, 155, 156, 157, 158, 159, 32, 161, 165, 166, 167, 40, 41, 42, 44, 45, 47, 30, 54, 59, 62, 53, 160, 66, 67, 68, 70, 71, 72, 74, 75, 76, 77, 78, 79, 80, 81, 85, 86, 89, 94, 96, 97, 98, 99, 100, 101, 102, 103, 104, 110, 111, 116, 117, 118, 119, 63, 126, 127], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/isolate.py": [61, 62], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/person.py": [1, 2, 3, 4, 5, 6, 7, 8, 10, 11], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/__init__.py": [1], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/person_unit_test.py": [1, 2, 4, 6, 7, 8, 10, 11, 12, 14], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/living_space.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/proxy.py": [30, 163, 164, 165, 168, 169, 170, 43, 45, 46, 47, 176, 177, 178, 57, 58, 59, 60, 61, 62, 63, 64, 78, 80, 81, 82, 83, 102, 103, 104, 110, 111, 112, 116, 117, 118], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/office.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/cover.py": [164, 263, 173, 271, 182, 183], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/xunit.py": [192, 193, 191], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/tests/context.py": [1, 2, 3, 5], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/manager.py": [128, 262, 263, 264, 265, 272, 273, 274, 149, 167, 166, 295, 168, 169, 301, 302, 177, 178, 184, 249, 88, 89, 93, 94, 95, 96, 99, 252, 106, 107, 111, 114, 123, 118, 105, 120, 121, 250, 251, 124, 253, 254], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/skip.py": [57, 59, 60, 61], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/debug.py": [40, 41, 42, 43], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/util.py": [320, 446, 662, 263, 520, 521, 266, 267, 140, 397, 270, 271, 272, 273, 274, 403, 276, 277, 278, 279, 408, 409, 410, 411, 312, 163, 164, 406, 470, 264, 306, 307, 308, 309, 310, 393, 184, 313, 187, 188, 189, 190, 191, 192, 321, 322, 195, 407, 471, 447, 311, 663, 337, 338, 339, 340, 398, 342, 343, 399, 479, 323, 481, 483, 484, 485, 486, 449, 404, 448, 660, 318, 502, 503, 504, 505, 506, 319, 405], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/fellow.py": [1, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 20, 21, 22], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/termstyle.py": [43, 44, 62, 63], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/selector.py": [129, 130, 131, 134, 135, 171, 68, 69, 162, 35, 37, 167, 40, 41, 42, 43, 44, 45, 174, 175, 176, 178, 179, 53, 54, 57, 187, 188, 191, 193, 194, 196, 197, 72, 73, 74, 76, 77, 80, 81, 163, 169, 222, 224, 225, 226, 227, 228, 229, 232, 233, 234, 235, 236, 237, 238, 239, 240, 241, 116, 117, 118, 119, 120, 121, 122, 123, 170, 126, 127], "/Users/ydaniju/Documents/checkpoints/python/1/allocator/lib/amity.py": [], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/deprecated.py": [40, 42, 43, 44], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/base.py": [98, 100, 101, 102], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/testid.py": [137, 138, 142, 143, 144, 145, 148, 149, 150, 151, 154, 155], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/result.py": [38, 39, 40, 41, 43, 44], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/logcapture.py": [34, 38, 39, 40, 41, 44, 178, 179, 193, 194, 195, 196, 198, 199, 76, 204, 77, 78, 207, 80, 209, 86, 217, 79, 222, 208], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/capture.py": [64, 96, 98, 69, 102, 97, 58, 59, 101], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/plugins/failuredetail.py": [33, 35, 36], "/Users/ydaniju/.virtualenvs/allocator/lib/python2.7/site-packages/nose/case.py": [128, 129, 130, 131, 132, 133, 140, 147, 148, 149, 151, 29, 33, 34, 36, 37, 38, 39, 40, 41, 42, 45, 59, 60, 64, 69, 70, 74, 99, 100, 101, 102, 103, 104]}}
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
language: python
python:
- "2.7"
- "3.4"
before_script:
- pip install -r requirements.txt
script:
Expand Down
22 changes: 22 additions & 0 deletions lib/fellow.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
"""
Fellow resides here
"""
from .person import Person

class Fellow(Person):
def __init__(self, name, amity_interest = "N", amity_room_name = None):
super(Fellow, self).__init__(name)
self.amity_interest = amity_interest
self.amity_room_name = amity_room_name

def set_amity_interest(self, amity_interest):
self.amity_interest = amity_interest

def set_amity_room_name(self, amity_room_name):
self.amity_room_name = amity_room_name

def show_fellow_info(self):
print("Name: %s" % (self.name))
print("Office: %s" % (self.office_name))
print("Amity Room: %s" % (self.amity_room_name))
Binary file added lib/fellow.pyc
Binary file not shown.
Binary file modified lib/person.pyc
Binary file not shown.
9 changes: 9 additions & 0 deletions lib/staff.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from .person import Person

class Staff(Person):
def __init__(self, name):
super(Staff, self).__init__(name)

def show_staff_info(self):
print("Name: %s" % (self.name))
print("Office: %s" % (self.office_name))
Binary file added lib/staff.pyc
Binary file not shown.
Binary file modified tests/__init__.pyc
Binary file not shown.
4 changes: 3 additions & 1 deletion tests/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
import sys
sys.path.insert(0, os.path.abspath('..'))

from lib.person import Person
from lib.person import Person
from lib.fellow import Fellow
from lib.staff import Staff
Binary file modified tests/context.pyc
Binary file not shown.
24 changes: 24 additions & 0 deletions tests/fellow_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
import unittest
from .context import Fellow

class TestFellow(unittest.TestCase):
def test_fellow_is_initialized_with_name(self):
man = Fellow("Yusuf")
self.assertEqual("Yusuf", man.name)

def test_set_amity_interest(self):
man = Fellow("Yusuf")
man.set_amity_interest("Y")
self.assertEqual("Y", man.amity_interest)

def test_set_amity_room_name(self):
man = Fellow("Yusuf")
man.set_amity_room_name("Yacht")
self.assertEqual("Yacht", man.amity_room_name)

def test_show_fellow_info(self):
man = Fellow("Yusuf")
self.assertIsNone(man.show_fellow_info())

if __name__ == '__main__':
unittest.main()
Binary file added tests/fellow_test.pyc
Binary file not shown.
File renamed without changes.
Binary file added tests/person_test.pyc
Binary file not shown.
Binary file modified tests/person_unit_test.pyc
Binary file not shown.
14 changes: 14 additions & 0 deletions tests/staff_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import unittest
from .context import Staff

class TestFellow(unittest.TestCase):
def test_staff_is_initialized_with_name(self):
man = Staff("Makinwa")
self.assertEqual("Makinwa", man.name)

def test_show_staff_info(self):
man = Staff("Makinwa")
self.assertIsNone(man.show_staff_info())

if __name__ == '__main__':
unittest.main()
Binary file added tests/staff_test.pyc
Binary file not shown.

0 comments on commit 86a647e

Please sign in to comment.