Hi guys, I'm setting up a pytest mixin for SpiceDB...
# spicedb
t
Hi guys, I'm setting up a pytest mixin for SpiceDB, and I want to delete all the relationships created during a test in cleanup. My fixture currently looks like this:
Copy code
class Mixin:
  client = Client(....)

  @fixture(scope="function", autouse=True)
  def clean_up_relationships(self):
    response = self.client.Watch(WatchRequest())
    yield
    print([relationships for relationships in response])
    # I'd delete all relationships here, but first I'm trying to see if I can see the relationships to begin with
So the problem I'm having is that the iterator to view the relationships updates
print([relationships for relationships in response])
is looping forever. I don't know if this is the best way to delete all relationships, or why I can't see the updates made during the test.
2 Views