Skip to content

Commit

Permalink
add update name fuzzy match with existing target test
Browse files Browse the repository at this point in the history
  • Loading branch information
jchate6 committed Feb 7, 2023
1 parent 1f08463 commit 3d5b00e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions tom_targets/tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -770,6 +770,13 @@ def test_raw_update_process(self):
self.assertTrue(new_name in self.target.names)
self.assertFalse('testtarget' in self.target.names)

# Update target name to fuzzy match to existing alias
self.assertTrue('test_target' in self.target.names)
new_name = "alias (1)"
self.target.name = new_name
with self.assertRaises(ValidationError):
self.target.full_clean()

# Add new valid alias with invalid alias in DB
bad_alias_data = {'name': "Test Target",
'target': self.target}
Expand Down

0 comments on commit 3d5b00e

Please sign in to comment.