Skip to content

Commit

Permalink
remove client from conftest
Browse files Browse the repository at this point in the history
  • Loading branch information
peterdudfield committed Aug 17, 2023
1 parent 3613f1f commit 98a4487
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions forecast-inference/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import pytest
from freezegun import freeze_time
from pvsite_datamodel.connection import DatabaseConnection
from pvsite_datamodel.sqlmodels import Base, ClientSQL, GenerationSQL, SiteSQL, StatusSQL
from pvsite_datamodel.sqlmodels import Base, GenerationSQL, SiteSQL, StatusSQL
from testcontainers.postgres import PostgresContainer


Expand Down Expand Up @@ -56,26 +56,13 @@ def db_data(database_connection, now):

with database_connection.get_session() as session:

n_clients = 2
n_sites = 3
n_generations = 100

# Clients
clients = []
for i in range(n_clients):
client = ClientSQL(
client_name=f"testclient_{i}",
)
session.add(client)
clients.append(client)

session.commit()

# Sites
sites = []
for i in range(n_sites):
site = SiteSQL(
client_uuid=clients[i % n_clients].client_uuid,
client_site_id=i + 1,
latitude=51,
longitude=3,
Expand Down

0 comments on commit 98a4487

Please sign in to comment.