-
-
Notifications
You must be signed in to change notification settings - Fork 573
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fixed the test_add_entry_from_hek_qr test #1717
Conversation
…he number that assert uses has changed.
An interesting approach, @derdon opinions? |
I talked with @Punyaslok about this problem and it was my idea. As @Punyasiok said, this will not cause failing tests in the future because entries in a service will be added (or removed). My only criticism is that this PR should fix it on all similar places where the number of db entries is checked. |
Is there not a way to check the expected number of records to add to the database from the query result? |
I'm not too convinced of this solution.... I thought I had found the problem of this... but I don't remember why this was happening... will update if I find what it was. |
@dpshelio what specifically don't you like about this approach? In my opinion this test should be checking that given we must know how the records in the database are generated from the HEK results object, we should parse the results to calculate the number of records that will be added then check that the correct number have been added. @Punyaslok said on IRC that how to do this was not immediately apparent. @derdon any ideas? |
The HEK is not static, in the sense that time ranges that have already been http://vso.stanford.edu/hekwiki/ApplicationProgrammingInterface?action=print Maybe this would help lend some stability to the number of events returned On Thu, Mar 31, 2016 at 4:38 AM, Stuart Mumford notifications@github.com
|
As discussed in the dev meeting, this test is conflating two purposes which should be explicitly separated:
|
superseded by #1902 |
@Cadair @derdon
The
test_add_entry_from_hek_qr()
function was failing because the number 1678 in the assert statement has changed to 2133. So,assert len(database) > 0
will fix it in the long run.