diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tests/mod.rs | 4 | ||||
-rw-r--r-- | src/tests/pin.rs | 2 | ||||
-rw-r--r-- | src/tests/reset.rs | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/src/tests/mod.rs b/src/tests/mod.rs index e1f93a9..d31348b 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -120,8 +120,4 @@ impl Nitrocli { let (res, out, _) = self.do_run(args, |c, a| crate::handle_arguments(c, a)); res.map(|_| String::from_utf8_lossy(&out).into_owned()) } - - pub fn model(&self) -> Option<nitrokey::Model> { - self.model - } } diff --git a/src/tests/pin.rs b/src/tests/pin.rs index 551454c..7770fba 100644 --- a/src/tests/pin.rs +++ b/src/tests/pin.rs @@ -61,7 +61,7 @@ fn set_user(model: nitrokey::Model) -> anyhow::Result<()> { { let mut manager = nitrokey::force_take()?; - let device = manager.connect_model(ncli.model().unwrap())?; + let device = manager.connect_model(model)?; let _ = device .authenticate_user(nitrokey::DEFAULT_USER_PIN) .unwrap(); diff --git a/src/tests/reset.rs b/src/tests/reset.rs index a7b2097..bf1e75b 100644 --- a/src/tests/reset.rs +++ b/src/tests/reset.rs @@ -20,7 +20,7 @@ fn reset(model: nitrokey::Model) -> anyhow::Result<()> { { let mut manager = nitrokey::force_take()?; // Check that the admin PIN has been changed. - let device = manager.connect_model(ncli.model().unwrap())?; + let device = manager.connect_model(model)?; let _ = device.authenticate_admin(new_admin_pin).unwrap(); } @@ -32,7 +32,7 @@ fn reset(model: nitrokey::Model) -> anyhow::Result<()> { { let mut manager = nitrokey::force_take()?; // Check that the admin PIN has been reset. - let device = manager.connect_model(ncli.model().unwrap())?; + let device = manager.connect_model(model)?; let mut device = device .authenticate_admin(nitrokey::DEFAULT_ADMIN_PIN) .unwrap(); |