|
|
@@ -131,5 +131,14 @@ class TestClient(object): |
|
|
|
testfile = "tests/data/prep-20120323T1000" |
|
|
|
start = datetime_tz.datetime_tz.smartparse("20120323T1000") |
|
|
|
rate = 120 |
|
|
|
|
|
|
|
# First try a nonexistent path |
|
|
|
data = nilmdb.timestamper.TimestamperRate(testfile, start, 120) |
|
|
|
with assert_raises(ClientError) as e: |
|
|
|
result = client.stream_insert("/newton/no-such-path", data) |
|
|
|
assert("404" in e.exception.status) |
|
|
|
|
|
|
|
# Now do the real load |
|
|
|
data = nilmdb.timestamper.TimestamperRate(testfile, start, 120) |
|
|
|
result = client.stream_insert("/newton/prep", data) |
|
|
|
print result |