예제 #1
0
def test_tubes(c: Client) -> None:
    assert c.tubes() == ["default"]
    c.use("a")
    assert set(c.tubes()) == {"default", "a"}
    c.watch("b")
    c.watch("c")
    assert set(c.tubes()) == {"default", "a", "b", "c"}
예제 #2
0
def test_tubes(c: Client) -> None:
    assert c.tubes() == ['default']
    c.use('a')
    assert set(c.tubes()) == {'default', 'a'}
    c.watch('b')
    c.watch('c')
    assert set(c.tubes()) == {'default', 'a', 'b', 'c'}
예제 #3
0
def test_basic_usage(c: Client) -> None:
    c.use("emails")
    id = c.put("测试@example.com".encode("utf-8"))
    c.watch("emails")
    c.ignore("default")
    job = c.reserve()
    assert id == job.id
    assert job.body.decode("utf-8") == "测试@example.com"
    c.delete(job)
예제 #4
0
def test_basic_usage(c: Client) -> None:
    c.use('emails')
    id = c.put('测试@example.com')
    c.watch('emails')
    c.ignore('default')
    job = c.reserve()
    assert id == job.id
    assert job.body == '测试@example.com'
    c.delete(job)
예제 #5
0
def test_watching(c: Client) -> None:
    assert c.watching() == ["default"]
    c.watch("another")
    assert set(c.watching()) == {"default", "another"}
예제 #6
0
def test_watching(c: Client) -> None:
    assert c.watching() == ['default']
    c.watch('another')
    assert set(c.watching()) == {'default', 'another'}