Skip to content

Commit

Permalink
Add test files for examples
Browse files Browse the repository at this point in the history
  • Loading branch information
harishmohanraj committed Oct 11, 2023
1 parent 1572bf0 commit 9eee1c8
Show file tree
Hide file tree
Showing 21 changed files with 102 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pytest.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[pytest]
minversion = 7.0
addopts = -ra -q
testpaths =
search/tests
Empty file added search/tests/__init__.py
Empty file.
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from search.examples.example_consume_publish_with_key.test_app import (
test_point_was_incremented,
)

__all__ = ("test_point_was_incremented",)
6 changes: 6 additions & 0 deletions search/tests/examples/test_example_course_update.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from search.examples.example_course_updates.test_app import (
test_app_with_new_content,
test_app_without_new_content,
)

__all__ = ("test_app_with_new_content", "test_app_without_new_content")
6 changes: 6 additions & 0 deletions search/tests/examples/test_example_execute_trade.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from search.examples.example_execute_trade.test_app import (
test_app_with_sell_action,
test_app_without_sell_action,
)

__all__ = ("test_app_without_sell_action", "test_app_with_sell_action")
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_forward_to_another_topic.test_app import test_app

__all__ = ("test_app",)
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_forward_to_multiple_topics.test_app import test_app

__all__ = ("test_app",)
7 changes: 7 additions & 0 deletions search/tests/examples/test_example_infinity_publishing.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# import pytest

from search.examples.example_infinity_publishing.test_app import (
test_message_was_published,
)
__all__ = ("test_message_was_published",)
# pytest.mark.slow(test_message_was_published)
9 changes: 9 additions & 0 deletions search/tests/examples/test_example_investment_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from search.examples.example_investment_updates.test_app import (
test_invest_grater_amount_than_threshold,
test_invest_smaller_amount_than_threshold,
)

__all__ = (
"test_invest_smaller_amount_than_threshold",
"test_invest_grater_amount_than_threshold",
)
3 changes: 3 additions & 0 deletions search/tests/examples/test_example_new_employee.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_new_employee.test_app import test_new_employee

__all__ = ("test_new_employee",)
3 changes: 3 additions & 0 deletions search/tests/examples/test_example_pets.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_pets.test_app import test_app

__all__ = ("test_app",)
6 changes: 6 additions & 0 deletions search/tests/examples/test_example_plants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from search.examples.example_plants.test_app import (
test_sell_plant_is_called,
test_still_growing_is_calles,
)

__all__ = ("test_sell_plant_is_called", "test_still_growing_is_calles")
9 changes: 9 additions & 0 deletions search/tests/examples/test_example_product_reviews.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
from search.examples.example_product_reviews.test_app import (
test_app_where_review_grade_is_grater_then_5,
test_app_where_review_grade_is_less_then_5,
)

__all__ = (
"test_app_where_review_grade_is_grater_then_5",
"test_app_where_review_grade_is_less_then_5",
)
5 changes: 5 additions & 0 deletions search/tests/examples/test_example_publish_with_key.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from search.examples.example_publish_with_key.test_app import (
test_point_was_incremented,
)

__all__ = ("test_point_was_incremented",)
3 changes: 3 additions & 0 deletions search/tests/examples/test_example_scram256_security.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_scram256_security.test_app import test_app

__all__ = ("test_app",)
3 changes: 3 additions & 0 deletions search/tests/examples/test_example_scram512_security.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from search.examples.example_scram512_security.test_app import test_app

__all__ = ("test_app",)
9 changes: 9 additions & 0 deletions search/tests/examples/test_example_scrape_weather.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# import pytest

from search.examples.example_scrape_weather.test_app import (
test_message_was_published,
)

__all__ = ("test_message_was_published",)

# pytest.mark.slow(test_message_was_published)
6 changes: 6 additions & 0 deletions search/tests/examples/test_example_social_media_post.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from search.examples.example_social_media_post.test_app import (
test_post_with_just_two_likes,
test_post_with_many_likes,
)

__all__ = ("test_post_with_just_two_likes", "test_post_with_many_likes")
5 changes: 5 additions & 0 deletions search/tests/examples/test_example_student_query.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
from search.examples.example_student_query.test_app import (
test_message_published_to_correct_topic,
)

__all__ = ("test_message_published_to_correct_topic",)
6 changes: 6 additions & 0 deletions search/tests/examples/test_example_weather_updates.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from search.examples.example_weather_updates.test_app import (
test_not_published_to_weather_alerts,
test_published_to_weather_alerts,
)

__all__ = ("test_not_published_to_weather_alerts", "test_published_to_weather_alerts")

0 comments on commit 9eee1c8

Please sign in to comment.