def test_list_files_in_static_cached():
    # import pdb; pdb.set_trace()
    with isolate_lru_cache(list_files_in_static):
        with patch('stagesetting.utils._get_files_in_static_storage') as is_called:
            for x in range(0, 6):
                list_files_in_static()
            is_called.assert_called_once_with(only_matching=None)
def test_list_files_in_static_partial():
    found = tuple(list_files_in_static(only_matching='\.txt$'))
    found2 = tuple(list_files_in_static(only_matching='\.txt$'))
    # make sure they're the same.
    assert found == found2
    assert len(found) == 1
    assert found[0][0] == 'admin'
    assert found[0][1] == (('admin/js/LICENSE-JQUERY.txt', 'js/LICENSE-JQUERY.txt'),)
def test_list_files_in_static():
    found = tuple(list_files_in_static())
    found2 = tuple(list_files_in_static())
    # make sure they're the same.
    assert found == found2
    assert len(found) == 1
    assert found[0][0] == 'admin'
    assert ('admin/js/LICENSE-JQUERY.txt', 'js/LICENSE-JQUERY.txt') in found[0][1]
    assert ('admin/css/changelists.css', 'css/changelists.css') in found[0][1]