-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #34 from neo4j-field/develop-backend-tests
Develop backend tests
- Loading branch information
Showing
15 changed files
with
289 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
OPENAI_API_KEY="sk-..." | ||
OPENAI_VERSION="2023-03-15-preview" | ||
NEO4J_URI="neo4j+s://abc123.databases.neo4j.io" | ||
NEO4J_USERNAME="neo4j" | ||
NEO4J_PASSWORD="password" | ||
NEO4J_DATABASE="neo4j" | ||
GCP_PROJECT_ID="proj-123" | ||
GCP_REGION="us-central1" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python3 -m unittest tests.runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python3 -m unittest tests.database_runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
python3 -m unittest tests.route_runner |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import unittest | ||
|
||
mods = ["test_graph_reader", "test_graph_writer"] | ||
# initialize the test suite | ||
loader = unittest.TestLoader() | ||
suite = unittest.TestSuite() | ||
|
||
# add tests to the test suite | ||
for mod in mods: | ||
suite.addTests(loader.loadTestsFromName(f"tests.{mod}")) | ||
|
||
# initialize a runner, pass it your suite and run it | ||
runner = unittest.TextTestRunner(verbosity=3) | ||
result = runner.run(suite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import unittest | ||
|
||
|
||
mods = ["test_llm_route", "test_rating_route"] | ||
# initialize the test suite | ||
loader = unittest.TestLoader() | ||
suite = unittest.TestSuite() | ||
|
||
# add tests to the test suite | ||
for mod in mods: | ||
suite.addTests(loader.loadTestsFromName(f"tests.{mod}")) | ||
|
||
# initialize a runner, pass it your suite and run it | ||
runner = unittest.TextTestRunner(verbosity=3) | ||
result = runner.run(suite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# tests/runner.py | ||
import os | ||
import unittest | ||
|
||
# import your test modules | ||
from . import * | ||
|
||
mods = [x[:-3] for x in os.listdir("tests/") if x.startswith("test_")] | ||
# initialize the test suite | ||
loader = unittest.TestLoader() | ||
suite = unittest.TestSuite() | ||
|
||
# add tests to the test suite | ||
for mod in mods: | ||
suite.addTests(loader.loadTestsFromName(f"tests.{mod}")) | ||
|
||
# initialize a runner, pass it your suite and run it | ||
runner = unittest.TextTestRunner(verbosity=3) | ||
result = runner.run(suite) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.