Skip to content

Commit

Permalink
Fix: minor change in how file name was passed #6348
Browse files Browse the repository at this point in the history
  • Loading branch information
voetberg committed Nov 17, 2023
1 parent 4d8a9ac commit c158b34
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions tests/test_rule.py
Expand Up @@ -1384,15 +1384,14 @@ def test_list_rules_by_did(self, mock_scope, did_factory, jdoe_account, rucio_cl

def test_list_rules_by_name(self, mock_scope, did_factory, jdoe_account, rucio_client):
""" NAME (CLIENT): List Replication Rules per NAME """
files = create_files(3, mock_scope, self.rse1_id)
files = create_files(1, mock_scope, self.rse1_id)
dataset = did_factory.random_dataset_did()
add_did(did_type=DIDType.DATASET, account=jdoe_account, **dataset)
attach_dids(dids=files, account=jdoe_account, **dataset)

rule_id_1 = add_rule(dids=[dataset], account=jdoe_account, copies=1, rse_expression=self.rse1, grouping='NONE', weight='fakeweight', lifetime=None, locked=False, subscription_id=None)[0]
rule_id_2 = add_rule(dids=[dataset], account=jdoe_account, copies=1, rse_expression=self.rse2, grouping='NONE', weight='fakeweight', lifetime=None, locked=False, subscription_id=None)[0]

ret = rucio_client.list_associated_rules_for_file(scope=mock_scope.external, name=dataset['name'])
ret = rucio_client.list_associated_rules_for_file(scope=mock_scope.external, name=files[0]['name'])
ids = [rule['id'] for rule in ret]

assert rule_id_1 in ids
Expand Down

0 comments on commit c158b34

Please sign in to comment.