Add anchor style preset node
This commit is contained in:
@@ -351,6 +351,34 @@ class DumasImageNodeTests(unittest.TestCase):
|
||||
},
|
||||
)
|
||||
|
||||
def test_anchor_style_node_exposes_requested_presets(self):
|
||||
input_types = self.image_nodes.DumasAnchorStyleNode.INPUT_TYPES()
|
||||
options = input_types["required"]["anchor_style"][0]
|
||||
|
||||
self.assertGreaterEqual(len(options), 20)
|
||||
self.assertIn("cinematic action movie", options)
|
||||
self.assertIn("comedy", options)
|
||||
self.assertIn("found footage", options)
|
||||
self.assertIn("90s sitcom", options)
|
||||
self.assertIn("mobile/cell phone captured", options)
|
||||
self.assertIn("news broadcast", options)
|
||||
|
||||
def test_anchor_style_node_defaults_to_selected_preset_description(self):
|
||||
node = self.image_nodes.DumasAnchorStyleNode()
|
||||
|
||||
result = node.build_anchor("found footage", "")
|
||||
|
||||
self.assertIn("found-footage", result[0])
|
||||
self.assertIn("real time", result[0])
|
||||
|
||||
def test_anchor_style_node_prefers_manual_description_edits(self):
|
||||
node = self.image_nodes.DumasAnchorStyleNode()
|
||||
custom = "Lo-fi pirate broadcast with smeared highlights and anxious zoom corrections."
|
||||
|
||||
result = node.build_anchor("news broadcast", custom)
|
||||
|
||||
self.assertEqual(result[0], custom)
|
||||
|
||||
def test_save_image_returns_ui_entries_for_output_folder(self):
|
||||
node = self.image_nodes.DumasSaveImageNode()
|
||||
image = FakeTensorBatch()
|
||||
|
||||
Reference in New Issue
Block a user