Skip to content

Commit

Permalink
Cleaned up test_stateless_compute
Browse files Browse the repository at this point in the history
  • Loading branch information
rlb131 committed Jul 17, 2023
1 parent 467c831 commit 98faea2
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions sirepo_bluesky/tests/test_stateless_compute.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,12 @@

import bluesky.plan_stubs as bps
import bluesky.plans as bp
import databroker
import dictdiffer
import numpy as np
import vcr
from databroker import Broker

import sirepo_bluesky.tests
from sirepo_bluesky.sirepo_ophyd import create_classes
from sirepo_bluesky.srw_handler import SRWFileHandler
from sirepo_bluesky.utils.json_yaml_converter import dict_to_file

cassette_location = os.path.join(os.path.dirname(sirepo_bluesky.tests.__file__), "vcr_cassettes")
Expand Down Expand Up @@ -136,17 +133,9 @@ def test_stateless_compute_crystal(srw_tes_simulation, tmp_path):
print(f"{key} passed")


def test_stateless_compute_with_RE(RE, srw_chx_simulation):
def test_stateless_compute_with_RE(RE, srw_chx_simulation, db):
classes, objects = create_classes(srw_chx_simulation.data, connection=srw_chx_simulation)
globals().update(**objects)
db = Broker.named("local") # mongodb backend
try:
databroker.assets.utils.install_sentinels(db.reg.config, version=1)
except Exception:
pass

RE.subscribe(db.insert)
db.reg.register_handler("srw", SRWFileHandler, overwrite=True)
crl1.tipRadius.kind = "hinted" # noqa
sample.duration.kind = "hinted" # noqa

Expand Down

0 comments on commit 98faea2

Please sign in to comment.