Skip to content

Commit

Permalink
clean up commits from key value tests
Browse files Browse the repository at this point in the history
  • Loading branch information
villebro committed Jun 18, 2024
1 parent d1a88de commit e409f69
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 9 deletions.
3 changes: 0 additions & 3 deletions tests/integration_tests/key_value/commands/create_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ def test_create_id_entry(app_context: AppContext, admin: User) -> None: # noqa:
assert json.loads(entry.value) == JSON_VALUE
assert entry.created_by_fk == admin.id
db.session.delete(entry)
db.session.commit()


def test_create_uuid_entry(app_context: AppContext, admin: User) -> None: # noqa: F811
Expand All @@ -65,7 +64,6 @@ def test_create_uuid_entry(app_context: AppContext, admin: User) -> None: # noq
assert json.loads(entry.value) == JSON_VALUE
assert entry.created_by_fk == admin.id
db.session.delete(entry)
db.session.commit()


def test_create_fail_json_entry(app_context: AppContext, admin: User) -> None: # noqa: F811
Expand Down Expand Up @@ -93,4 +91,3 @@ def test_create_pickle_entry(app_context: AppContext, admin: User) -> None: # n
assert type(pickle.loads(entry.value)) == type(PICKLE_VALUE)
assert entry.created_by_fk == admin.id
db.session.delete(entry)
db.session.commit()
1 change: 0 additions & 1 deletion tests/integration_tests/key_value/commands/delete_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ def key_value_entry() -> KeyValueEntry:
value=bytes(json.dumps(JSON_VALUE), encoding="utf-8"),
)
db.session.add(entry)
db.session.commit()
return entry


Expand Down
4 changes: 0 additions & 4 deletions tests/integration_tests/key_value/commands/get_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,9 @@ def test_get_expired_entry(app_context: AppContext) -> None:
expires_on=datetime.now() - timedelta(days=1),
)
db.session.add(entry)
db.session.commit()
value = GetKeyValueCommand(resource=RESOURCE, key=ID_KEY, codec=JSON_CODEC).run()
assert value is None
db.session.delete(entry)
db.session.commit()


def test_get_future_expiring_entry(app_context: AppContext) -> None:
Expand All @@ -96,8 +94,6 @@ def test_get_future_expiring_entry(app_context: AppContext) -> None:
expires_on=datetime.now() + timedelta(days=1),
)
db.session.add(entry)
db.session.commit()
value = GetKeyValueCommand(resource=RESOURCE, key=id_, codec=JSON_CODEC).run()
assert value == JSON_VALUE
db.session.delete(entry)
db.session.commit()
1 change: 0 additions & 1 deletion tests/integration_tests/key_value/commands/upsert_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,4 +98,3 @@ def test_upsert_missing_entry(app_context: AppContext, admin: User) -> None: #
assert key is not None
assert key.id == 456
db.session.query(KeyValueEntry).filter_by(id=456).delete()
db.session.commit()

0 comments on commit e409f69

Please sign in to comment.