|
|
@@ -242,6 +242,19 @@ class TestClient(object): |
|
|
|
in_("400 Bad Request", str(e.exception)) |
|
|
|
in_("start must precede end", str(e.exception)) |
|
|
|
|
|
|
|
# Invalid times in HTTP request |
|
|
|
with assert_raises(ClientError) as e: |
|
|
|
client.http.put("stream/insert", "", { "path": "/newton/prep", |
|
|
|
"start": "asdf", "end": 0 }) |
|
|
|
in_("400 Bad Request", str(e.exception)) |
|
|
|
in_("invalid start", str(e.exception)) |
|
|
|
|
|
|
|
with assert_raises(ClientError) as e: |
|
|
|
client.http.put("stream/insert", "", { "path": "/newton/prep", |
|
|
|
"start": 0, "end": "asdf" }) |
|
|
|
in_("400 Bad Request", str(e.exception)) |
|
|
|
in_("invalid end", str(e.exception)) |
|
|
|
|
|
|
|
# Good content type |
|
|
|
with assert_raises(ClientError) as e: |
|
|
|
client.http.put("stream/insert", "", |
|
|
|