There was an error while loading. Please reload this page.
1 parent a26660f commit ce00bd8Copy full SHA for ce00bd8
1 file changed
tests/app/services/test_user_service.py
@@ -0,0 +1,25 @@
1
+import pytest
2
+
3
+from prometheus.app.services.database_service import DatabaseService
4
+from prometheus.app.services.user_service import UserService
5
+from tests.test_utils.fixtures import postgres_container_fixture
6
7
8
+@pytest.fixture
9
+def mock_database_service(postgres_container_fixture):
10
+ service = DatabaseService(postgres_container_fixture.get_connection_url())
11
+ service.start()
12
+ return service
13
14
15
+def test_create_superuser(mock_database_service):
16
+ # Exercise
17
+ service = UserService(mock_database_service)
18
+ service.create_superuser(
19
+ "testuser",
20
+ "test@gmail.com",
21
+ "password123",
22
+ github_token="gh_token"
23
+ )
24
25
+# TODO test login
0 commit comments