Exemplo n.º 1
0
  def setUp(self):
    self.app = create_app()
    self.client = MongoClient(self.app.config["MONGO_URI"])
    self.table = self.client.tests.tests

    self.app.test_client.get("/")
    
    name = "Test Node"
    self.user = {"type": "User", "name": name, "email": "*****@*****.**", "slug": slugify(name), "path": "/", "trees": []}
    result = self.table.insert_one(self.user)
    self.user["_id"] = result.inserted_id
    self.table.update_one({"type": "Community"}, {"$addToSet": {"users": self.user["_id"]}})
Exemplo n.º 2
0
 def setUp(self):
     self.app = create_app()
     self.client = MongoClient(self.app.config["MONGO_URI"])
     self.table = self.client.tests.tests
Exemplo n.º 3
0
 def setUp(self):
     self.app = create_app()