<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;"># name_campus_test.py

""" Unit tests for name and campus modules """

import name
import campus
import cornellasserts

def test_last_name_first():
    """Calls all the tests for last_name_first"""
    print('Testing function last_name_first')

    # Test Case 1
    result = name.last_name_first('Katherine Johnson')
    cornellasserts.assert_equals('Johnson, Katherine', result)
    # Test Case 2
    result = name.last_name_first('Katherine     Johnson')
    cornellasserts.assert_equals('Johnson, Katherine', result)


def test_get_campus_num():
    """Calls all the tests for get_campus_num"""
    print('Testing function get_campus_num')
    # Test case 1
    result= campus.get_campus_num('6071231234')
    cornellasserts.assert_equals('3-1234', result)
    # Test case 2
    result= campus.get_campus_num('1111111111')
    cornellasserts.assert_equals('1-1111', result)


# Execution of the testing code
test_last_name_first()
print('All tests of the module name passed')
test_get_campus_num()
print('All tests of the module campus passed')
print('All tests of all modules passed')
</pre></body></html>