Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/magicmark/moto-issue-2
https://github.com/magicmark/moto-issue-2
Last synced: 1 day ago
JSON representation
- Host: GitHub
- URL: https://github.com/magicmark/moto-issue-2
- Owner: magicmark
- Created: 2023-10-30T20:44:07.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-30T22:03:30.000Z (about 1 year ago)
- Last Synced: 2023-10-30T23:21:40.176Z (about 1 year ago)
- Language: Python
- Size: 28.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# moto-issue-2
### Repro instructions
```bash
$ git clone https://github.com/magicmark/moto-issue-demo-2.git
$ cd moto-issue-2
$ poetry install
$ poetry run pytest -vvv
```### Output
```
=========================================================================== test session starts ============================================================================
platform linux -- Python 3.8.13, pytest-7.4.3, pluggy-1.3.0
rootdir: /nail/home/markl/pg/moto-issue-demo
collected 1 itemtests/yikes_test.py F [100%]
================================================================================= FAILURES =================================================================================
________________________________________________________________________________ test_yikes ________________________________________________________________________________dynamodb = dynamodb.ServiceResource()
def test_yikes(dynamodb):
dynamodb.Table("meal-orders").put_item(
Item={
"customer": "mark",
"mealtime": "breakfast",
}
)
> assert 'Item' not in dynamodb.Table("meal-orders").get_item(
Key={
"customer": "mark",
"mealtime": "lunch",
}
)
E AssertionError: assert 'Item' not in {'Item': {'customer': 'mark', 'mealtime': 'breakfast'}, 'ResponseMetadata': {'HTTPHeaders': {'date': 'Mon, 30 Oct 2023...eit'}, 'HTTPStatusCode': 200, 'RequestId': '77j7t488VZMp0LEtqw77cGXhTRPnS9W5Eu98ryU2drVYruC7veit', 'RetryAttempts': 0}}
E + where {'Item': {'customer': 'mark', 'mealtime': 'breakfast'}, 'ResponseMetadata': {'HTTPHeaders': {'date': 'Mon, 30 Oct 2023...eit'}, 'HTTPStatusCode': 200, 'RequestId': '77j7t488VZMp0LEtqw77cGXhTRPnS9W5Eu98ryU2drVYruC7veit', 'RetryAttempts': 0}} = .do_action of dynamodb.Table(name='meal-orders')>(Key={'customer': 'mark', 'mealtime': 'lunch'})
E + where .do_action of dynamodb.Table(name='meal-orders')> = dynamodb.Table(name='meal-orders').get_item
E + where dynamodb.Table(name='meal-orders') = .create_resource of dynamodb.ServiceResource()>('meal-orders')
E + where .create_resource of dynamodb.ServiceResource()> = dynamodb.ServiceResource().Tabletests/yikes_test.py:32: AssertionError
========================================================================= short test summary info ==========================================================================
FAILED tests/yikes_test.py::test_yikes - AssertionError: assert 'Item' not in {'Item': {'customer': 'mark', 'mealtime': 'breakfast'}, 'ResponseMetadata': {'HTTPHeaders': {'date': 'Mon, 30 Oct 2023...eit'}, 'H...
```