-
Notifications
You must be signed in to change notification settings - Fork 48
Expand file tree
/
Copy path__init__.py
More file actions
25 lines (18 loc) · 989 Bytes
/
__init__.py
File metadata and controls
25 lines (18 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
from MongoDBLibrary.mongo_connection_manager import MongoConnectionManager
from MongoDBLibrary.mongoquery import MongoQuery
from MongoDBLibrary.version import VERSION
class MongoDBLibrary(MongoConnectionManager, MongoQuery):
"""
MongoDB Library contains utilities meant for Robot Framework's usage.
This can allow you to query your Mongo database after an action has been made to verify the results.
References:
+ PyMongo 3.0.3 Documentation - http://api.mongodb.org/python/3.0.3/
Example Usage:
| Connect To MongoDB | foo.bar.org | ${27017} |
| ${QueryJSON} | Set Variable | {"name" : "username" ,"in_use": false} |
| ${UpdateJSON} | Set Variable | {"$set": {"in_use" : true}} |
| &{allResults} | Retrieve and Update One Mongodb Record | DBName | CollectionName | ${QueryJSON} | ${UpdateJSON} |
| Log | ${allResults} |
"""
ROBOT_LIBRARY_SCOPE = 'GLOBAL'
ROBOT_LIBRARY_VERSION = VERSION