Closed tiffanylin43 closed 5 years ago
@dward2 Also, there are a lot of functions doing data conversion or data validation but requires communication with MongoDB, are tests needed for them? If so, how can we test them?
Those data tests or conversions should be done in a different function that can be tested separate from MongoDB
From: tiffanylin43 notifications@github.com Sent: Sunday, April 28, 2019 6:41:56 PM To: SylviaCHS/BME547_Final_Project Cc: Dr David Ward, Ph.D.; Mention Subject: Re: [SylviaCHS/BME547_Final_Project] Unit tests (#64)
@dward2https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_dward2&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=WVB0AkKZSJYOogSw1e8On0aILoYKZ2RcMU0BRNlj41k&m=RQ3qhi980i72IUCx_6naD7uaCT-Ai1qTQRHo7t7eWG4&s=EyxJ6bOwneVJyA3-0MBvn5RJ_I5oFM2kvEwoicmHlhw&e= Also, there are a lot of functions doing data conversion or data validation but requires communication with MongoDB, are tests needed for them? If so, how can we test them?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHubhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_SylviaCHS_BME547-5FFinal-5FProject_issues_64-23issuecomment-2D487421674&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=WVB0AkKZSJYOogSw1e8On0aILoYKZ2RcMU0BRNlj41k&m=RQ3qhi980i72IUCx_6naD7uaCT-Ai1qTQRHo7t7eWG4&s=xfNpJSa2dB5stiqFZAsdijSjHH8RFkzXjYk-Fp2rHQM&e=, or mute the threadhttps://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_notifications_unsubscribe-2Dauth_AJS2Q72Z6RJ7I2YXMO5AZMDPSYR3JANCNFSM4HI7RBQQ&d=DwMCaQ&c=imBPVzF25OnBgGmVOlcsiEgHoG1i6YHLR0Sj_gZ4adc&r=WVB0AkKZSJYOogSw1e8On0aILoYKZ2RcMU0BRNlj41k&m=RQ3qhi980i72IUCx_6naD7uaCT-Ai1qTQRHo7t7eWG4&s=q98XhvS4gUxdEqsMXDG0EftJrQpRV0MmKCAUJM8mRKY&e=.
@dward2 OK, we'll be sure to include those tests. The other question that we had was about FileIO type functions. These are functions that convert data into a savable format (no processing, just saving). Do those need to be tested?
All the unit tests should have been added.
@dward2 Hi, Dr.Ward! I'm writing unit tests for our latest codes. But I'm not sure if the tests are needed or how to do the tests for certain functions.
For 'client.py', most of the functions are used to communicate with the server, which we don't have to test, right? For the left 2 functions called 'read_file_as_b64(image_path)' and 'save_b64_image(base64_string)', I'm not sure if the tests are need. If so, how should they be tested? I think they are basically doing data conversion, but not sure how to test if the function works.
For 'client_inline.py', there is another function called 'download_b64_image(base64_string, filename)', do I need to test it?