Skip to content

Commit 080376d

Browse files
committed
add sample entry to anomaly db
1 parent 0e4f1f7 commit 080376d

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

hypernets_processor/test/test_functions.py

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,13 @@ def setup_test_anomaly_db(url):
5959

6060
db = HypernetsDBBuilder.create_db_template(url, "anomaly")
6161

62-
# todo - add test data to test anomaly db
62+
db["anomalies"].insert(
63+
dict(
64+
anomaly="anomaly_name",
65+
raw_product_name="SEQ20200311T112430",
66+
site="site",
67+
)
68+
)
6369

6470
db.commit()
6571
del db
@@ -78,14 +84,14 @@ def setup_test_archive_db(url):
7884
db["products"].insert(
7985
dict(
8086
product_name="new_product1",
81-
raw_product_name="SEQ20200311T112230",
87+
raw_product_name="SEQ20200311T112130",
8288
site="site",
8389
)
8490
)
8591
db["products"].insert(
8692
dict(
8793
product_name="new_product2",
88-
raw_product_name="SEQ20200311T112330",
94+
raw_product_name="SEQ20200311T112230",
8995
site="site",
9096
)
9197
)
@@ -234,6 +240,11 @@ def setup_test_context(
234240
if create_directories:
235241
os.makedirs(processor_config["Output"]["archive_directory"])
236242
os.makedirs(job_config["Input"]["raw_data_directory"])
243+
os.makedirs(
244+
os.path.join(
245+
job_config["Input"]["raw_data_directory"], "SEQ20200311T112230"
246+
)
247+
)
237248
os.makedirs(
238249
os.path.join(
239250
job_config["Input"]["raw_data_directory"], "SEQ20200311T112330"

0 commit comments

Comments
 (0)