Skip to content

Commit 28c5635

Browse files
disable acled tests
1 parent 767a7de commit 28c5635

File tree

4 files changed

+13
-0
lines changed

4 files changed

+13
-0
lines changed

backend-python/src/media_impact_monitor/api_test.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ def client():
1010
yield test_client
1111

1212

13+
@pytest.mark.skip("acled disabled")
1314
@pytest.mark.filterwarnings("ignore::DeprecationWarning")
1415
def test_get_events_success(client):
1516
response = client.post(

backend-python/src/media_impact_monitor/data_loaders/protest/acled/acled_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from media_impact_monitor.data_loaders.protest.acled.acled import get_acled_events
66

77

8+
@pytest.mark.skip("acled disabled")
89
def test_get_protests_with_keyword():
910
test_countries = ["Germany", "Burkina Faso"]
1011
df = get_acled_events(
@@ -30,6 +31,7 @@ def test_get_protests_with_keyword():
3031
).any(), "Empty strings should not be present in the organizers column."
3132

3233

34+
@pytest.mark.skip("acled disabled")
3335
def test_get_protests_fail_with_both_countries_and_regions():
3436
"""Test that the function raises an assertion error when both countries and regions are specified."""
3537
with pytest.raises(AssertionError):

backend-python/src/media_impact_monitor/events_test.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
from datetime import date, timedelta
22

33
import pandas as pd
4+
import pytest
45

56
from media_impact_monitor.events import (
67
filter_climate_orgs,
@@ -12,6 +13,7 @@
1213
from media_impact_monitor.types_ import EventSearch, Organizer
1314

1415

16+
@pytest.mark.skip("acled disabled")
1517
def test_get_events_basic():
1618
end_date = date(2024, 1, 1)
1719
df = get_events(EventSearch(source="acled", end_date=end_date))
@@ -39,6 +41,7 @@ def test_get_events_basic():
3941
assert len(df_last_gen) > 100
4042

4143

44+
@pytest.mark.skip("acled disabled")
4245
def test_get_events_with_filters():
4346
end_date = date.today()
4447
start_date = end_date - timedelta(days=90)
@@ -61,6 +64,7 @@ def test_get_events_with_filters():
6164
assert all(df_fff["organizers"].apply(lambda x: "Fridays for Future" in x))
6265

6366

67+
@pytest.mark.skip("acled disabled")
6468
def test_get_events_topic_comparison():
6569
end_date = date(2024, 1, 1)
6670
df_all = get_events(EventSearch(source="acled", end_date=end_date))
@@ -79,6 +83,7 @@ def test_get_events_topic_comparison():
7983
assert strs_all.issuperset(strs_climate)
8084

8185

86+
@pytest.mark.skip("acled disabled")
8287
def test_get_events_by_id():
8388
end_date = date(2024, 4, 1)
8489
start_date = date(2024, 1, 1)
@@ -101,6 +106,7 @@ def test_get_events_by_id():
101106
assert str(retrieved) == str(events)
102107

103108

109+
@pytest.mark.skip("acled disabled")
104110
def test_filter_climate_orgs():
105111
df = pd.DataFrame(
106112
{
@@ -118,6 +124,7 @@ def test_filter_climate_orgs():
118124
assert all(filtered_df.index == [0, 2])
119125

120126

127+
@pytest.mark.skip("acled disabled")
121128
def test_org_freqs():
122129
freqs = org_freqs()
123130
assert isinstance(freqs, pd.Series)
@@ -126,6 +133,7 @@ def test_org_freqs():
126133
assert (freqs >= 0).all()
127134

128135

136+
@pytest.mark.skip("acled disabled")
129137
def test_organizers_with_id():
130138
organizers = organizers_with_id()
131139
assert isinstance(organizers, list)

backend-python/src/media_impact_monitor/impact_test.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from media_impact_monitor.types_ import ImpactSearch, TrendSearch
66

77

8+
@pytest.mark.skip("acled disabled")
89
def test_xr():
910
get_impact(
1011
ImpactSearch(
@@ -24,6 +25,7 @@ def test_xr():
2425
)
2526

2627

28+
@pytest.mark.skip("acled disabled")
2729
def test_xr_api():
2830
_get_impact(
2931
ImpactSearch(

0 commit comments

Comments
 (0)