Skip to content

Commit

Permalink
fix test function
Browse files Browse the repository at this point in the history
  • Loading branch information
rf-ife committed Nov 8, 2024
1 parent 6bafa66 commit 8fe7c41
Showing 1 changed file with 25 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,32 @@ def test_01_maintenance_equipment_sequence(self):
sequence number has been set
"""
# Create category
seq_0 = self.sequence_obj.create(
{
"name": "Test Sequence",
"implementation": "no_gap",
"prefix": "TTC_TEST",
"padding": 4,
"number_increment": 1,
"use_date_range": False,
"sequence_number_next": 1,
}
)
categ_0 = self.maintenance_equipment_categ_obj.create(
{
"name": "Test Category 0",
"sequence_id": seq_0.id,
}
)
self.assertEqual(categ_0.sequence_prefix, seq_0.prefix)

categ_1 = self.maintenance_equipment_categ_obj.create(
[
{
"name": "Test Category",
"sequence_prefix": "TTC",
"sequence_number_next": 1,
}
]
)[0]
{
"name": "Test Category",
"sequence_prefix": "TTC",
"sequence_number_next": 1,
}
)
seq_1 = self.sequence_obj.search(
[("name", "=", categ_1.name), ("prefix", "=", "TTC")], limit=1
)
Expand Down

0 comments on commit 8fe7c41

Please sign in to comment.