Example #1
0
def test_full_class() -> Class:
    test_full_class = Class(
        class_id=test_full_class_data_set['json_dict_rep']['id'],
        name=test_full_class_data_set['json_dict_rep']['name'])
    for student in test_full_class_data_set['json_dict_rep']['students']:
        test_full_class.add_student(Student(**student))

    test_full_class.json_str_rep = test_full_class_data_set['json_str_rep']
    test_full_class.json_dict_rep = test_full_class_data_set['json_dict_rep']

    return test_full_class
Example #2
0
def test_class_name_only():
    """Returns empty class instantiated with name only."""
    test_class_name_only = Class(
        class_id=test_class_name_only_data_set['json_dict_rep']['id'],
        name=test_class_name_only_data_set['json_dict_rep']['name'])

    # Add attributes to test expected output.
    test_class_name_only.json_str_rep = test_class_name_only_data_set[
        'json_str_rep']
    test_class_name_only.json_dict_rep = test_class_name_only_data_set[
        'json_dict_rep']

    return test_class_name_only