Skip to content

Commit ec55a7b

Browse files
authored
[TOOLSLIBS-400] Remove historical location support (#188)
* rm location-based audience selectors * removes location based selectors, tests * rm LocationFinder module
1 parent aa25773 commit ec55a7b

File tree

8 files changed

+4
-441
lines changed

8 files changed

+4
-441
lines changed

tests/devices/test_location.py

Lines changed: 0 additions & 140 deletions
This file was deleted.

tests/push/test_audience.py

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -90,32 +90,6 @@ def test_compound_selectors(self):
9090

9191
self.assertEqual(ua.not_(ua.tag("foo")), {"not": {"tag": "foo"}})
9292

93-
def test_time_period_selector(self):
94-
self.assertEqual(ua.recent_date(days=4), {"recent": {"days": 4}})
95-
self.assertEqual(
96-
ua.absolute_date(resolution="days", start="2012-01-01", end="2012-01-15"),
97-
{"days": {"start": "2012-01-01", "end": "2012-01-15"}},
98-
)
99-
self.assertEqual(
100-
ua.absolute_date(resolution="weeks", start="2012-01-01", end="2012-01-15"),
101-
{"weeks": {"start": "2012-01-01", "end": "2012-01-15"}},
102-
)
103-
104-
# Invalid time periods
105-
self.assertRaises(ValueError, ua.recent_date, hours=1, minutes=1)
106-
self.assertRaises(ValueError, ua.recent_date, eons=1)
107-
self.assertRaises(ValueError, ua.absolute_date, "eons", "alpha", "omega")
108-
109-
def test_location_selector(self):
110-
self.assertEqual(
111-
ua.location(id="a_location_id", date=ua.recent_date(days=4)),
112-
{"location": {"id": "a_location_id", "date": {"recent": {"days": 4}}}},
113-
)
114-
115-
self.assertRaises(ValueError, ua.location)
116-
self.assertRaises(ValueError, ua.location, alias=1, id=1)
117-
self.assertRaises(ValueError, ua.location, date=None, id="foobar")
118-
11993

12094
class TestAttributeSelectors(unittest.TestCase):
12195
def test_date_incorrect_operator_raises(self):

urbanairship/__init__.py

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
EmailAttachment,
2020
EmailTags,
2121
KeywordInteraction,
22-
LocationFinder,
2322
ModifyAttributes,
2423
NamedUser,
2524
NamedUserList,
@@ -42,7 +41,6 @@
4241
Template,
4342
TemplateList,
4443
TemplatePush,
45-
absolute_date,
4644
actions,
4745
alias,
4846
all_,
@@ -65,7 +63,6 @@
6563
ios_channel,
6664
local_scheduled_time,
6765
localization,
68-
location,
6966
merge_data,
7067
message,
7168
mms,
@@ -78,7 +75,6 @@
7875
options,
7976
or_,
8077
public_notification,
81-
recent_date,
8278
recurring_schedule,
8379
schedule_exclusion,
8480
static_list,
@@ -138,9 +134,6 @@
138134
and_,
139135
or_,
140136
not_,
141-
location,
142-
recent_date,
143-
absolute_date,
144137
notification,
145138
ios,
146139
android,
@@ -169,6 +162,7 @@
169162
schedule_exclusion,
170163
static_list,
171164
subscription_list,
165+
localization,
172166
ChannelList,
173167
ChannelInfo,
174168
OpenChannel,
@@ -194,7 +188,6 @@
194188
CustomEventsList,
195189
StaticList,
196190
StaticLists,
197-
LocationFinder,
198191
Template,
199192
TemplateList,
200193
ScheduledList,

urbanairship/core.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ def __init__(self, location=None):
3232
self.segments_url = self.base_url + "segments/"
3333
self.reports_url = self.base_url + "reports/"
3434
self.lists_url = self.base_url + "lists/"
35-
self.location_url = self.base_url + "location/"
3635
self.attributes_url = self.channel_url + "attributes/"
3736
self.attributes_list_url = self.base_url + "attribute-lists/"
3837
self.message_center_delete_url = self.base_url + "user/messages/"

urbanairship/devices/__init__.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from .channel_uninstall import ChannelUninstall
44
from .devicelist import APIDList, ChannelInfo, ChannelList, DeviceInfo, DeviceTokenList
55
from .email import Email, EmailAttachment, EmailTags
6-
from .locationfinder import LocationFinder
76
from .named_users import NamedUser, NamedUserList, NamedUserTags
87
from .open_channel import OpenChannel
98
from .segment import Segment, SegmentList

0 commit comments

Comments
 (0)