package main import ( "testing" ) func TestReadVideoURL(t *testing.T) { u := readVideoURL("media_for_test/videourl.json") expected := "http://153.37.232.148/vweixinp.tc.qq.com/1007_baa70feeaffb450682d848707e2d38d9.f10.mp4?vkey=6027E95AC6BADE010F39C1C08FA1E8E264C4702D52BE4B04C6BAF89A0857AB371971463C6C1D5D4779E1B748D1BC21041EC5AFBCD41BE4E7D0295A3DA96254505E8ACBDF1C427FD2FC92D5AB0CA9BFD16C0E02D99675DED4&sha=0&save=1" AssertEqual(t, u, expected, "URL should be equal to "+expected) }