def test_copy_queryset_with_filters():
    # When create a queryset
    t = QuerySet("http://foobar:9200")

    # With filters
    t.filter(Term("foo", "bar"))

    # And I clone the queryset
    new_object = t.objects

    # And add new filters
    new_object.filter(Term("bar", "baz"))

    # Then the new object is not the same object as the queryset
    assert(new_object is not t)

    # And is not the same query object
    assert(new_object._query is not t._query)

    # But it is has the same properties
    heterogeneous(new_object._query, t._query)
Connect endpoint from URL.
dataset/ETHPy150Open Yipit/pyeqs/tests/unit/test_copy.py/test_copy_queryset_with_filters--crossover with--dataset/ETHPy150Open mrjoes/tornadio2/tornadio2/session.py/Session.connect_endpoint