upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/test_utils
diff options
context:
space:
mode:
Diffstat (limited to 'test_utils')
-rw-r--r--test_utils/Cargo.toml4
-rw-r--r--test_utils/src/lib.rs10
2 files changed, 7 insertions, 7 deletions
diff --git a/test_utils/Cargo.toml b/test_utils/Cargo.toml
index c4e1b1a..0784b1a 100644
--- a/test_utils/Cargo.toml
+++ b/test_utils/Cargo.toml
@@ -9,8 +9,8 @@ assert_cmd = "2.0.12"
9dialoguer = "0.10.4" 9dialoguer = "0.10.4"
10directories = "5.0.1" 10directories = "5.0.1"
11git2 = "0.18.1" 11git2 = "0.18.1"
12nostr = "0.29" 12nostr = { git = "https://github.com/DanConwayDev/nostr", branch="expose-nip49-log-n" }
13nostr-sdk = "0.29" 13nostr-sdk = { git = "https://github.com/DanConwayDev/nostr", branch="expose-nip49-log-n" }
14once_cell = "1.18.0" 14once_cell = "1.18.0"
15rand = "0.8" 15rand = "0.8"
16rexpect = { git = "https://github.com/rust-cli/rexpect.git", rev = "9eb61dd" } 16rexpect = { git = "https://github.com/rust-cli/rexpect.git", rev = "9eb61dd" }
diff --git a/test_utils/src/lib.rs b/test_utils/src/lib.rs
index a693607..daed8fa 100644
--- a/test_utils/src/lib.rs
+++ b/test_utils/src/lib.rs
@@ -24,8 +24,8 @@ pub static TEST_KEY_1_NPUB: &str =
24pub static TEST_KEY_1_PUBKEY_HEX: &str = 24pub static TEST_KEY_1_PUBKEY_HEX: &str =
25 "f53e4bcd7a9cdef049cf6467d638a1321958acd3b71eb09823fd6fadb023d768"; 25 "f53e4bcd7a9cdef049cf6467d638a1321958acd3b71eb09823fd6fadb023d768";
26pub static TEST_KEY_1_DISPLAY_NAME: &str = "bob"; 26pub static TEST_KEY_1_DISPLAY_NAME: &str = "bob";
27pub static TEST_KEY_1_ENCRYPTED: &str = "ncryptsec1qyq607h3cykxc3f2a44u89cdk336fptccn3fm5pf3nmf93d3c86qpunc7r6klwcn6lyszjy72wxwqq9aljg4pm6atvjrds9e248yhv76xfnt464265kgnjsvg8rlg06wg4sp9uljzfpu8zuaztcvfn2j8ggdrg8mldh850cy75efsyqqansert9wqmn4e6khpgvfz7h5le9"; 27pub static TEST_KEY_1_ENCRYPTED: &str = "ncryptsec1qgq77e3uftz8dh3jkjxwdms3v6gwqaqduxyzld82kskas8jcs5xup3sf2pc5tr0erqkqrtu0ptnjgjlgvx8lt7c0d7laryq2u7psfa6zm7mk7ln3ln58468shwatm7cx5wy5wvm7yk74ksrngygwxg74";
28pub static TEST_KEY_1_ENCRYPTED_WEAK: &str = "ncryptsec1qy8ke0tjqnn8wt3w6lnc86c27ry3qrptxctjfcgruryxy0at238kwyjwsswd7z88thysruzw3awlrsxjvw5uptcd7vt70ft9rtkx00m8cgy3khm4hxa5d2gfnc6athnfruy2eyl6pkas8k34jg85z7xjqqadzfzh9rp0fzxqtw0tvxksac3n8yc98uksvuf93e0lcvqy8j6"; 28pub static TEST_KEY_1_ENCRYPTED_WEAK: &str = "ncryptsec1qg835almhlrmyxqtqeva44d5ugm9wk2ccmwspxrqv4wjsdpdlud9es5hsrvs0pas7dvsretm0mc26qwfc7v8986mqngnjshcplnqzj62lxf44a0kkdv788f6dh20x2eum96l2j8v37s5grrheu2hgrkf";
29pub static TEST_KEY_1_KEYS: Lazy<nostr::Keys> = 29pub static TEST_KEY_1_KEYS: Lazy<nostr::Keys> =
30 Lazy::new(|| nostr::Keys::from_str(TEST_KEY_1_NSEC).unwrap()); 30 Lazy::new(|| nostr::Keys::from_str(TEST_KEY_1_NSEC).unwrap());
31 31
@@ -121,13 +121,13 @@ pub fn make_event_old_or_change_user(
121 121
122 unsigned.created_at = 122 unsigned.created_at =
123 nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_u64() - how_old_in_secs); 123 nostr::types::Timestamp::from(nostr::types::Timestamp::now().as_u64() - how_old_in_secs);
124 unsigned.id = nostr::EventId::new( 124 unsigned.id = Some(nostr::EventId::new(
125 &keys.public_key(), 125 &keys.public_key(),
126 unsigned.created_at, 126 &unsigned.created_at,
127 &unsigned.kind, 127 &unsigned.kind,
128 &unsigned.tags, 128 &unsigned.tags,
129 &unsigned.content, 129 &unsigned.content,
130 ); 130 ));
131 131
132 unsigned.sign(keys).unwrap() 132 unsigned.sign(keys).unwrap()
133} 133}