예제 #1
0
    def test_multiples(self):
        """ Test synchronization between empty attribute and rdf_direct. """

        store = Store()
        session = Session(store)
        
        Person = session.get_class(surf.ns.FOAF.Person)
        
        rob = session.get_resource("http://Robert", Person)
        rob.foaf_name = "Robert"
        michael = session.get_resource("http://Michael", Person)
        michael.foaf_name = "Michael"
        
        # Should not fail.
        store.save(rob, michael)
        store.update(rob, michael)
        store.remove(rob, michael)
예제 #2
0
    def test_multiples(self):
        """ Test synchronization between empty attribute and rdf_direct. """

        store = Store(log_level=logging.NOTSET)
        session = Session(store)

        Person = session.get_class(surf.ns.FOAF.Person)

        rob = session.get_resource("http://Robert", Person)
        rob.foaf_name = "Robert"
        michael = session.get_resource("http://Michael", Person)
        michael.foaf_name = "Michael"

        # Should not fail.
        store.save(rob, michael)
        store.update(rob, michael)
        store.remove(rob, michael)
예제 #3
0
def test_multiples():
    """
    Test synchronization between empty attribute and rdf_direct.
    """

    store = Store(log_level=logging.NOTSET)
    session = Session(store)

    Person = session.get_class(surf.ns.FOAF.Person)

    rob = session.get_resource("http://Robert", Person)
    rob.foaf_name = "Robert"
    michael = session.get_resource("http://Michael", Person)
    michael.foaf_name = "Michael"

    try:
        store.save(rob, michael)
        store.update(rob, michael)
        store.remove(rob, michael)
    except Exception, e:
        pytest.fail(e.message, pytrace=True)