Skip to content

Commit a8dfb9d

Browse files
committed
fix: remove integration tests as of now
1 parent 52a1be7 commit a8dfb9d

File tree

2 files changed

+0
-33
lines changed

2 files changed

+0
-33
lines changed

src/db_ops/question.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -89,22 +89,3 @@ pub mod query {
8989
}
9090
}
9191
}
92-
93-
#[cfg(test)]
94-
mod tests {
95-
96-
use super::*;
97-
use crate::deserializers::question::ProblemSetQuestionListQuery;
98-
use sea_orm::Database;
99-
// refactor to create mock db tests
100-
#[tokio::test]
101-
async fn test() {
102-
let database_client = Database::connect("sqlite://leetcode.sqlite").await.unwrap();
103-
let json = r#"{ "data": { "problemsetQuestionList": { "total": 2777, "questions": [ { "acRate": 45.35065222510613, "difficulty": "Medium", "freqBar": null, "frontendQuestionId": "6", "isFavor": false, "paidOnly": false, "status": "ac", "title": "Zigzag Conversion", "titleSlug": "zigzag-conversion", "topicTags": [ { "name": "String", "id": "VG9waWNUYWdOb2RlOjEw", "slug": "string" } ], "hasSolution": true, "hasVideoSolution": false } ] } } }"#;
104-
let ppp: ProblemSetQuestionListQuery = serde_json::from_str(json).unwrap();
105-
let questions = ppp.get_questions();
106-
Question::multi_insert(&database_client, questions)
107-
.await
108-
.unwrap();
109-
}
110-
}

src/db_ops/topic_tag.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -32,17 +32,3 @@ impl TopicTag {
3232
.collect::<HashMap<TopicTagModel, Vec<QuestionModel>>>())
3333
}
3434
}
35-
36-
#[cfg(test)]
37-
pub mod tests {
38-
use sea_orm::Database;
39-
40-
use super::*;
41-
42-
#[tokio::test]
43-
async fn test_fetch() {
44-
let database_client = Database::connect("sqlite://leetcode.sqlite").await.unwrap();
45-
let q = TopicTag::get_questions_by_topic(&database_client, "array").await;
46-
dbg!(q.unwrap());
47-
}
48-
}

0 commit comments

Comments
 (0)