Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
3nids committed Nov 22, 2023
1 parent a7fc57e commit 5868ef7
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 315 deletions.
27 changes: 27 additions & 0 deletions _BACKUP_57025.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
.idea
.DS_Store
*.orig
.schemalintrc.js
__pycache__
*.qgs~
local_test.sh
*.backup
.ghtoken
official-signs.json
postgresql.jar
schemaspy*.jar
schemaspy/
website/local.html
project/this-is-the-way.jpg
project/signalo.ts
<<<<<<< HEAD
projet/signalo_attachments.zip
=======
project/signalo_attachments.zip
>>>>>>> c3363eb ([FEATURE] add anchor point (left/center/right) + sign hanging mode (recto/verso))
website/tx
Pipfile
Pipfile.lock
.env
Pipfile
project/images/_*
22 changes: 22 additions & 0 deletions _BASE_57025.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.idea
.DS_Store
*.orig
.schemalintrc.js
__pycache__
*.qgs~
local_test.sh
*.backup
.ghtoken
official-signs.json
postgresql.jar
schemaspy*.jar
schemaspy/
website/local.html
project/this-is-the-way.jpg
project/signalo.ts
website/tx
Pipfile
Pipfile.lock
.env
Pipfile
project/images/_*
23 changes: 23 additions & 0 deletions _LOCAL_57025.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.idea
.DS_Store
*.orig
.schemalintrc.js
__pycache__
*.qgs~
local_test.sh
*.backup
.ghtoken
official-signs.json
postgresql.jar
schemaspy*.jar
schemaspy/
website/local.html
project/this-is-the-way.jpg
project/signalo.ts
projet/signalo_attachments.zip
website/tx
Pipfile
Pipfile.lock
.env
Pipfile
project/images/_*
23 changes: 23 additions & 0 deletions _REMOTE_57025.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
.idea
.DS_Store
*.orig
.schemalintrc.js
__pycache__
*.qgs~
local_test.sh
*.backup
.ghtoken
official-signs.json
postgresql.jar
schemaspy*.jar
schemaspy/
website/local.html
project/this-is-the-way.jpg
project/signalo.ts
project/signalo_attachments.zip
website/tx
Pipfile
Pipfile.lock
.env
Pipfile
project/images/_*
29 changes: 16 additions & 13 deletions test/test_reordering.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,32 +38,35 @@ def test_reorder_signs_in_rank(self):
)

row = {
"frame_fk_azimut": azimut_id,
"frame_rank": 1,
"frame_fk_frame_type": 1,
"frame_fk_frame_fixing_type": 1,
"frame_fk_status": 1,
"sign_rank": 1,
"fk_azimut": azimut_id,
"fk_frame_type": 1,
"fk_frame_fixing_type": 1,
"fk_status": 1,
}

frame_id = self.insert("frame", row)

row = {
"fk_frame": frame_id,
"fk_sign_type": 1,
"fk_official_sign": "1.01",
"fk_durability": 1,
"fk_status": 1,
"comment": "1",
}
sign_ids = [self.insert("vw_sign_symbol", row, schema="signalo_app")]
frame_id = self.select("sign", sign_ids[0])["fk_frame"]

row["frame_id"] = frame_id
row["fk_frame"] = frame_id
sign_ids = []

for i in range(2, 6):
row["sign_rank"] = i
for i in range(1, 6):
row["rank"] = i
row["comment"] = str(i)
sign_ids.append(self.insert("vw_sign_symbol", row, schema="signalo_app"))
sign_ids.append(self.insert("sign", row))

self.assertEqual(self.count("sign"), sign_count + 5)
self.assertEqual(self.count("frame"), frame_count + 1)

self.delete("vw_sign_symbol", sign_ids[1], schema="signalo_app")
self.delete("sign", sign_ids[1])

self.check({"rank": 1, "comment": "1"}, "sign", sign_ids[0])
self.check({"rank": 2, "comment": "3"}, "sign", sign_ids[2])
Expand Down
Loading

0 comments on commit 5868ef7

Please sign in to comment.