Skip to content

Commit

Permalink
remove to_string and ok
Browse files Browse the repository at this point in the history
  • Loading branch information
JR-1991 committed Jul 18, 2024
1 parent 97def6c commit ee4f78d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions tests/dataset.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,19 @@ mod tests {

lazy_static! {
static ref BASE_URL: String = std::env::var("BASE_URL")
.ok()
.expect("BASE_URL must be set for tests");
}

lazy_static! {
static ref API_TOKEN: String = std::env::var("API_TOKEN")
.ok()
.expect("API_TOKEN must be set for tests");
}

#[tokio::test]
async fn test_create_delete_dataset() {
// Part 1: Create a dataset
// Arrange
let client = BaseClient::new(&BASE_URL.to_string(), Some(&API_TOKEN.to_string())).unwrap();
let client = BaseClient::new(&BASE_URL, Some(&API_TOKEN)).unwrap();
let body = fs::read_to_string("tests/fixtures/create_dataset_body.json")
.expect("Could not read body");
let body = serde_json::from_str::<DatasetCreateBody>(&body);
Expand Down Expand Up @@ -105,7 +103,7 @@ mod tests {
async fn test_dataset_file_upload() {
// Part 1: Create a dataset
// Arrange
let client = BaseClient::new(&BASE_URL.to_string(), Some(&API_TOKEN.to_string())).unwrap();
let client = BaseClient::new(&BASE_URL, Some(&API_TOKEN)).unwrap();
let body = fs::read_to_string("tests/fixtures/create_dataset_body.json")
.expect("Could not read body");

Expand Down

0 comments on commit ee4f78d

Please sign in to comment.