Open HugoLMFbd opened 2 years ago
check issue #1 it is also related to the institution, so we need to implement the Institution
model, please work together with the developer responsible for issue #1.
I didn't start solving this "issue_4", I'm having problems with the reference directory class_social
in the last pull and I cannot import anything from this python package, I'm planing to create the tests for the route, and the controller test too if is necessary after solving my problem with the reference.
Ok, let me join you later to check this problem...
I been working on the confirmation and I realized that the confirm_user
needs at first a confirmation_request
from the Teacher(user) , Student(user) or Institution(user)
I've tested the route @users_routes.get('/confirmation')
. I was trying to implement something out of my issue trying to do the request but I discarded .
In test_user_controller
I'm not sure if I can mock an append return because I been thinking the confirmation as appending a institution in Teacher(user), Student(user)
institution
attribute and the Teacher(user), Student(user)
in the associates
attribute of Institution
to complete the confirmation.
I'm planning today moving forward thru the controller test and implementation.
You can always encapsulate append
in a function and mock thar function. There is always a way to mock append, but since we are still learning I would advise to go for the first option.
in the fist approach I need an attribute for the class model Institution(user)
called association_requests:Optional[List[Union[Student, Teacher]]]
can I just add this attribute to it?
I'll mock confirmation_request
but in any case I have to append
the respective users associated to each class, institution
attribute for students, teachers class and associates
attribute for Institution class.
yes you can, make sure to make it Optional...
What I did yesterday?
I implement one tested route and one tested method.
Any problems?
I test the route for confirm_user
then when I implement the method I didn't noticed that I need a institution
argument in the confirm_user route and method. The problem is the route isn'tasser 200
now asser 422
a semantic problem.
What I plan for today?
Find a solution to this 422 problem and then continue testing to see what more should I implement in the confirmation method.
Good, Hugo. The 422 problem happens when you provide invalid or incomplete data to the router, please double-check if the data you are using to test the routes matches the models.
As an institution, I want to confirm the teachers who are working in the institution and confirm the student who study or have studied with us before.