Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions test/import_config_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from test.auth import auth, TestCase
import uuid
from socrata.http import UnexpectedResponseException
import time

class ImportConfigTest(TestCase):
def test_create_config(self):
Expand Down Expand Up @@ -61,6 +62,7 @@ def test_list_operations(self):
p = Socrata(auth)
name = "some_config %s" % str(uuid.uuid4())
config = p.configs.create(name, "replace")
time.sleep(5)

configs = p.configs.list()

Expand Down Expand Up @@ -129,6 +131,7 @@ def test_delete_config(self):
p = Socrata(auth)
name = "some_config %s" % str(uuid.uuid4())
config = p.configs.create(name, "replace")
time.sleep(5)

_ = config.delete()

Expand Down
3 changes: 3 additions & 0 deletions test/pandas_test.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
from socrata import Socrata
from socrata.authorization import Authorization
from auth import auth, TestCase
import time
try:
import pandas as pd
except ImportError:
print("Pandas is required for this test")
exit()

class TestPandas(TestCase):
def test_create_source(self):
rev = self.create_rev()
Expand All @@ -19,6 +21,7 @@ def test_create_source(self):
def test_source_csv(self):
rev = self.create_rev()
source = rev.create_upload('foo.csv')
time.sleep(5)

df = pd.read_csv('test/fixtures/simple.csv')
source = source.df(df)
Expand Down
5 changes: 4 additions & 1 deletion test/source_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
from socrata.authorization import Authorization
from test.auth import auth, TestCase
import uuid
import time

class TestSource(TestCase):
def test_create_source(self):
Expand Down Expand Up @@ -94,6 +95,7 @@ def test_upload_kml(self):
def test_upload_shapefile(self):
rev = self.create_rev()
source = rev.create_upload('wards.zip')
time.sleep(5)

with open('test/fixtures/wards.zip', 'rb') as f:
source = source.shapefile(f)
Expand Down Expand Up @@ -168,6 +170,7 @@ def test_create_source_outside_rev(self):
def test_upload_csv_outside_rev(self):
pub = Socrata(auth)
source = pub.sources.create_upload('foo.csv')
time.sleep(5)

with open('test/fixtures/simple.csv', 'rb') as f:
source = source.csv(f)
Expand Down Expand Up @@ -212,7 +215,7 @@ def test_source_change_on_existing_upload(self):
.change_parse_option('column_header').to(2)\
.run()

source = source.wait_for_finish(timeout = 300)
source = source.wait_for_finish(timeout = 600)

po = source.attributes['parse_options']
self.assertEqual(po['header_count'], 2)
Expand Down