Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wsgi_json tests: no need to mock ref housenumbers files anymore #4123

Merged
merged 1 commit into from
Aug 25, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 0 additions & 16 deletions src/wsgi_json/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -243,16 +243,11 @@ fn test_missing_housenumbers_view_result_json() {
},
});
let yamls_cache_value = context::tests::TestFileSystem::write_json_to_file(&yamls_cache);
let ref_file = context::tests::TestFileSystem::make_file();
let json_cache = context::tests::TestFileSystem::make_file();
let files = context::tests::TestFileSystem::make_files(
test_wsgi.get_ctx(),
&[
("data/yamls.cache", &yamls_cache_value),
(
"workdir/street-housenumbers-reference-budafok.lst",
&ref_file,
),
("workdir/cache-budafok.json", &json_cache),
],
);
Expand Down Expand Up @@ -308,17 +303,12 @@ fn test_additional_housenumbers_view_result_json() {
},
});
let yamls_cache_value = context::tests::TestFileSystem::write_json_to_file(&yamls_cache);
let ref_file = context::tests::TestFileSystem::make_file();
let cache_value = context::tests::TestFileSystem::make_file();
let files = context::tests::TestFileSystem::make_files(
test_wsgi.get_ctx(),
&[
("data/yamls.cache", &yamls_cache_value),
("workdir/additional-cache-budafok.json", &cache_value),
(
"workdir/street-housenumbers-reference-budafok.lst",
&ref_file,
),
],
);
file_system.set_files(&files);
Expand All @@ -329,12 +319,6 @@ fn test_additional_housenumbers_view_result_json() {
.get_abspath("workdir/additional-cache-budafok.json"),
Rc::new(RefCell::new(time::OffsetDateTime::UNIX_EPOCH)),
);
mtimes.insert(
test_wsgi
.get_ctx()
.get_abspath("workdir/street-housenumbers-reference-budafok.lst"),
Rc::new(RefCell::new(time::OffsetDateTime::UNIX_EPOCH)),
);
file_system.set_mtimes(&mtimes);
let file_system_rc: Rc<dyn context::FileSystem> = Rc::new(file_system);
test_wsgi.get_ctx().set_file_system(&file_system_rc);
Expand Down