This Gist contains a few tests for the JOSE bug fix.
The following line will run the tests.
<html lang="en"> | |
<head> | |
<!-- Meta --> | |
<meta charset="utf-8"> | |
<meta http-equiv="X-UA-Compatible" content="IE=edge"> | |
<meta name="viewport" content="width=device-width, initial-scale=1"> | |
<link rel="stylesheet" type="text/css" href="main.css"> | |
<link rel="stylesheet" type="text/css" href="rework-grid.css"> | |
</head> |
import tributary | |
from tributary.core import Engine, Message | |
from tributary.streams import StreamElement, StreamProducer | |
from tributary.events import StopMessage, STOP | |
import tributary.ext.fs as fs | |
import decimal | |
import time | |
import logging | |
import pyhash |
from tributary.core import Engine, Message, ExecutionContext, Service | |
from tributary.streams import StreamElement, StreamProducer | |
from tributary.events import StopMessage, STOP | |
import tributary.ext.fs as fs | |
import tributary.ext.ipc as ipc | |
from collections import defaultdict | |
import operator | |
import logging |
Create directory in ST3 Packages: eg. gosub | |
Copy GIST file into new directory: | |
/Users/mfranks/Library/Application Support/Sublime Text 3/Packages/gosub/gosubl.py |
>>> INSERT { | |
... year: 2014, month: 4, day: 1, | |
... key: '20140401', | |
... value: 1 | |
... } INTO COUNTER visits; | |
{ status_code: 2000, status: 'OK' } | |
>>> INSERT {key: '0x045678', value: 5} INTO CACHE latest_voltage; | |
{ status_code: 2000, status: 'OK' } |
grammar expr; | |
parse | |
: expression* EOF | |
; | |
expression | |
: assignmentExpression | |
; |
//CLIENT | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"net" | |
"runtime" | |
"sync" |
//CLIENT | |
package main | |
import ( | |
"bufio" | |
"fmt" | |
"io" | |
"math/rand" | |
"net" | |
"runtime" |
package httpmock | |
import ( | |
"errors" | |
"net/http" | |
) | |
// Responders are callbacks that receive and http request and return a mocked response. | |
type Responder func(*http.Request) (*http.Response, error) |