Esempio n. 1
0
def test_contains_checks_if_path_exists(exists):
    ("Node#cd should return a node representing the given path.")

    exists.return_value = True
    nd = Node("/foo/bar/")
    nd.contains("file.py").should.be.truthy
    exists.assert_has_calls([
        call('/foo/bar/file.py'),
    ])
    exists.call_count.should.equal(1)
Esempio n. 2
0
def test_contains_checks_if_path_exists(exists):
    ("Node#cd should return a node representing the given path.")

    exists.return_value = True
    nd = Node("/foo/bar/")
    nd.contains("file.py").should.be.truthy
    exists.assert_has_calls([
        call('/foo/bar/file.py'),
    ])
    exists.call_count.should.equal(1)