diff options
author | Cara Salter <cara@devcara.com> | 2022-04-19 14:24:37 -0400 |
---|---|---|
committer | Cara Salter <cara@devcara.com> | 2022-04-19 14:24:37 -0400 |
commit | c03b90b286b9193062f2d79a8bfefcdc43881f53 (patch) | |
tree | 5acca79149d94c70834dc1e492e030b29593d56f /src | |
parent | 53256aacaa8a8ec5728334afc20ba2945f829b69 (diff) | |
download | solarlib-c03b90b286b9193062f2d79a8bfefcdc43881f53.tar.gz solarlib-c03b90b286b9193062f2d79a8bfefcdc43881f53.zip |
More tests
Diffstat (limited to 'src')
-rw-r--r-- | src/house.rs | 8 | ||||
-rw-r--r-- | src/waifu.rs | 2 |
2 files changed, 3 insertions, 7 deletions
diff --git a/src/house.rs b/src/house.rs index 735413e..64d8faf 100644 --- a/src/house.rs +++ b/src/house.rs @@ -5,9 +5,7 @@ use crate::waifu::*; use crate::errors::Error; use serde::{Serialize, Deserialize}; -use std::convert::TryFrom; use virt::connect::Connect; -use std::net::{IpAddr, Ipv4Addr, Ipv6Addr}; #[derive(Serialize, Deserialize, Debug)] pub enum Address { @@ -84,16 +82,14 @@ mod test { #[test] fn connect_to_house() { - let h: House = House::new("test:///default".to_string()).unwrap(); + let _: House = House::new("test:///default".to_string()).unwrap(); } #[test] fn list_inhabitants() { let mut h: House = House::new("test:///default".to_string()).unwrap(); - let empty_vec: Vec<Waifu> = vec![]; - - h.inhabitants().unwrap(); + assert_eq!(h.inhabitants().unwrap().len(), 1); } } diff --git a/src/waifu.rs b/src/waifu.rs index 50bad19..55ff4ed 100644 --- a/src/waifu.rs +++ b/src/waifu.rs @@ -1,5 +1,5 @@ use std::convert::TryFrom; -use virt::{connect::Connect, domain::Domain}; +use virt::{domain::Domain}; use serde::{Serialize, Deserialize}; use crate::errors::Error; |