| Conditions | 3 |
| Total Lines | 29 |
| Code Lines | 14 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | from LORIS.query import login |
||
| 8 | def test_updateLocalTimepoint(): |
||
| 9 | import os |
||
| 10 | database_path = "Test.sqlite" |
||
| 11 | DCCID = 642461 |
||
| 12 | table_name = CNBP_schema_table_name |
||
| 13 | |||
| 14 | # Remove database if previously existed. |
||
| 15 | if os.path.exists(database_path): |
||
| 16 | os.remove(database_path) |
||
| 17 | |||
| 18 | # Create Database |
||
| 19 | create_localDB_CNBP(database_path) |
||
| 20 | |||
| 21 | # Get login token: |
||
| 22 | success, token = login() |
||
| 23 | |||
| 24 | # Create the entry with the right PSCID with proper DCCID on dev.cnbp.ca |
||
| 25 | create_entry(database_path, table_name, CNBP_schema_keyfield, 9999999999) |
||
| 26 | |||
| 27 | # Update above entry with the right mock PSCID. |
||
| 28 | update_entry(database_path, table_name, CNBP_schema_keyfield, 9999999999, "DCCID", DCCID, ) |
||
| 29 | |||
| 30 | # Now, the big guy. |
||
| 31 | success, reason = findTimePointUpdateDatabase(token, DCCID, database_path, table_name) |
||
| 32 | |||
| 33 | # Clean up database. |
||
| 34 | os.remove(database_path) |
||
| 35 | |||
| 36 | assert success |
||
This check looks for invalid names for a range of different identifiers.
You can set regular expressions to which the identifiers must conform if the defaults do not match your requirements.
If your project includes a Pylint configuration file, the settings contained in that file take precedence.
To find out more about Pylint, please refer to their site.