Use a testserver in tests. (#194)
This is a step towards allowing our tests to run without network access, which will make them more resilient and faster. Replace the URL in one instance of an HTTPS test that didn't need HTTPS.
This commit is contained in:
committed by
GitHub
parent
6e997909bf
commit
75bc803cf1
@@ -136,7 +136,10 @@ pub use serde_json::{to_value as serde_to_value, Map as SerdeMap, Value as Serde
|
||||
|
||||
/// Agents are used to keep state between requests.
|
||||
pub fn agent() -> Agent {
|
||||
Agent::default()
|
||||
#[cfg(not(test))]
|
||||
return Agent::default();
|
||||
#[cfg(test)]
|
||||
return test::test_agent();
|
||||
}
|
||||
|
||||
/// Make a request setting the HTTP method via a string.
|
||||
|
||||
Reference in New Issue
Block a user