Nick Stocchero
8d5c70a924
different aggregation strategy
2020-09-21 17:42:44 -06:00
Nick Stocchero
d8cea0213d
straighten out filter logic
2020-09-21 17:42:44 -06:00
Nick Stocchero
ceefe970bc
small flake issue
2020-09-21 17:42:44 -06:00
Nick Stocchero
ff84b63484
address PR comments
2020-09-21 17:42:44 -06:00
Nick Stocchero
7bc5b5c08f
Add IAM Role and Policy to Config
2020-09-21 17:42:44 -06:00
jweite
da07adae52
* Support for CloudFormation update and delete of Kinesis Streams ( #3212 )
...
* Support for CloudFormation stack resource deletion via backend resource method
delete_from_cloudformation_json() via parse_and_delete_resource().
* Correction to the inappropriate inclusion of EndingSequenceNumber in open shards.
This attribute should only appear in closed shards. This regretfully prevents
confirmation of consistent record counts after split/merge in unit tests.
* Added parameters/decorator to CloudFormationModel method declarations to calm-down Pycharm.
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
2020-08-03 16:04:05 +01:00
jweite
3342d49a43
S3 cloudformation update ( #3199 )
...
* First cut of S3 Cloudformation Update support: encryption property.
* Update type support for S3. Abstract base class for CloudFormation-aware models, as designed by @bblommers, introduced to decentralize CloudFormation resource and name property values to model objects.
* Blackened...
* Un-renamed param in s3.models.update_from_cloudformation_json() and its call to stay compatible with other modules.
Co-authored-by: Bert Blommers <bblommers@users.noreply.github.com>
Co-authored-by: Joseph Weitekamp <jweite@amazon.com>
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 22:43:03 +01:00
Adam Richie-Halford
9a9a1d8413
Decentralize cloudformation naming responsibilities ( #3201 )
...
* #3127 - Decentralize CF naming responsibilities
* Decentralize CloudFormation naming responsibilities
* Update URLs in cloudformation_resource_type functions
* Fix flake8 errors
* Black formatting
* Add a bunch of imports to populate CloudFormationModel.__subclasses__
* Add noqa to s3 models import statement in cloudformation/parsing.py
* Black formatting
* Remove debugging print statement
Co-authored-by: Bert Blommers <info@bertblommers.nl>
2020-08-01 15:23:36 +01:00
Bert Blommers
8ff32bf4fa
Append region-info to UserAgent-header, if it already exists
2020-06-30 15:00:08 +01:00
Bert Blommers
f963d2ebaa
Allow service-invocations without region (S3, e.g.)
2020-06-27 20:13:42 +01:00
Bert Blommers
389939bf8a
Get region from args or kwargs
2020-06-27 19:46:26 +01:00
Bert Blommers
6ab2f58b21
Linting
2020-06-27 19:05:34 +01:00
Bert Blommers
7d43a1d23d
Store Region-info in UserAgent-header
2020-06-27 15:11:41 +01:00
Gordon Cassie
b88f166099
Fix: Support streaming upload from requests. ( #3062 )
...
* Fix: Support streaming upload from requests.
* [FIX] style.
Co-authored-by: Gordon Cassie <gordon.cassie@closingfolders.com>
2020-06-11 06:50:50 +01:00
Stijn Seghers
b8820009e8
Lazily import submodules
2020-04-28 10:40:32 +12:00
Daniel Wallace
d9e2aeed58
blacken
2020-04-22 10:02:25 -05:00
Daniel Wallace
50a147592d
Make all CallbackResponse requests into a Werkzeug Request
...
The "request" object in CallbackResponse is the PreparedRequest send by
whatever client is used to contact the mocked moto service. This can end
up with unparsed bodies, as we added for processing presigned post
requests in #2155 . This will make sure that all of the requests comming
in from mocked functions also get processed by werkzeug as if it was
running a live server.
2020-04-22 09:08:30 -05:00
Asher Foa
374b623e1d
Fix some 'DeprecationWarning: invalid escape sequence' warnings and use str.format for string interpolation.
...
I am seeing a lot of deperecation warnings when I use moto for my tests (running under pytest), so I figured I'll clean up some of them.
2020-03-12 13:50:59 -07:00
Bert Blommers
47349b30df
#2567 - When mocking URLs, always return the first match
2020-02-27 08:54:57 +00:00
Mike Grima
11b7be0e85
Implemented S3 Account-level public access block.
...
- Also added AWS Config listing and fetching support
- Also fixed Lambda test breakage
2020-02-17 15:41:27 -08:00
Fabio Dias
743dd46399
black linting
2019-12-16 21:25:20 -05:00
Fabio Dias
fd9ac4b9a5
ACCOUNT_ID moved to moto.core, MOTO_ACCOUNT_ID env var override
2019-12-16 21:05:29 -05:00
Mike Grima
bd777cad44
Fix for moto not unmocking.
...
- Fixes #2575
- Also upgraded Travis CI to make use of Bionic instead of Xenial
- This may also address concerns raised in #1793
2019-11-18 15:28:31 -08:00
Asher Foa
96e5b1993d
Run black on moto & test directories.
2019-10-31 10:36:05 -07:00
Mike Grima
2a2c3e80f0
Adding support for querying the AWS Config resource for S3.
...
- Need to add support still for batch requests and batch aggregation requests in a future PR
2019-10-13 10:14:15 -07:00
Mike Grima
c4b310d7a5
Adding support for querying AWS Config for supported configurations.
...
At this time, only adding support for S3.
2019-10-03 11:43:56 -07:00
Steve Pulec
efe676dbd5
Add comment.
2019-09-11 22:07:24 -05:00
Steve Pulec
aa896a0c2e
Merge pull request #2294 from spulec/fix-responses-mocking
...
Cleanup responses mocking. Closes #1567
2019-09-11 22:06:36 -05:00
Steve Pulec
077c667454
Merge pull request #2285 from spulec/move-env-mocking
...
Move env variable mocking and undo when stopping. CC #2058 , #2172 .
2019-07-19 23:56:40 -04:00
Steve Pulec
c7147b06b1
Cleanup responses mocking. Closes #1567
...
This unblocks requests to other websites with requests while Moto
is activated. It also adds a wildcard for AWS services to still
ensure no accidental requests are made for unmocked services
2019-07-10 21:59:25 -05:00
Steve Pulec
b19c201975
Cleanup model ref resetting.
2019-07-10 21:16:11 -05:00
Steve Pulec
308712841c
Have context manager return mock.
2019-07-09 20:31:43 -05:00
Steve Pulec
79cd1e609c
Move env variable mocking and undo when stopping. CC #2058 , #2172 .
2019-07-07 22:32:46 -05:00
Lorenz Hufnagel
cf5bd7665c
Mock AWS credentials
...
https://github.com/spulec/moto/issues/1924
2018-11-16 12:23:39 +01:00
Lorenz Hufnagel
b20e190995
Try to get tests running
2018-10-29 09:12:22 +01:00
Jordan Guymon
fd4e524855
Use env credentials for all tests
2018-10-29 09:12:22 +01:00
Jordan Guymon
8e909f580a
MockAWS implementation using botocore event hooks
2018-10-29 09:12:22 +01:00
Ollie Ford
0ac989cfd4
Fix #1809 : skip patching staticmethods
2018-09-05 12:01:34 +01:00
Steve Pulec
ec0d808010
Only start responses patcher if not already activated.
2018-04-11 09:39:38 -04:00
Steve Pulec
2ee484990d
Catch RuntimeError on unpatching in case of multiple unpatching.
2018-04-06 09:26:47 -04:00
Steve Pulec
cd1c6d3e6c
Unvendor responses, move back to upstream.
2018-04-05 16:57:43 -04:00
Terry Cain
d447929d29
utf 8 in key deletions V2 ( #1321 )
...
* supporting utf-8 in key deletions
* Fixed decoding of version body when regexing
* Fixed some more random errors
* Possible fix
* Fixed unused import
* Added UTF comment Py2
2017-11-06 13:39:08 -08:00
Pierre Tardy
2bae587a76
fix warning on py2 as well
...
object takes no constructor argument whatever the python version.
we simplify the code to not use constructor arguments
2017-05-15 11:28:42 +02:00
Steve Pulec
cda553abfb
Change tests to use default server port of 5000.
2017-03-12 21:04:19 -04:00
Steve Pulec
d2c56619cd
Add lint to Travis.
2017-03-12 20:35:45 -04:00
Steve Pulec
24affc7a5f
Fix py3 Model __new__.
2017-03-12 13:04:36 -04:00
Steve Pulec
caea5f441d
Fix resetting backends.
2017-03-11 23:18:58 -05:00
Steve Pulec
1709208872
First version of dashboard.
2017-03-11 22:45:42 -05:00
Steve Pulec
f37bad0e00
Lints.
2017-02-23 21:37:43 -05:00
Steve Pulec
81836b6981
Get standalone server mode working for all tests.
2017-02-23 19:43:48 -05:00
Steve Pulec
cb28eeefbb
Add moto reset API.
2017-02-20 18:25:10 -05:00
Steve Pulec
51df02e7cf
Cleanup Server host parsing.
2017-02-20 14:31:19 -05:00
Steve Pulec
cad185c74d
Cleanup headers and encoding.
2017-02-16 22:51:04 -05:00
Steve Pulec
fde721bed7
Testing new version of decorator.
2017-02-15 22:35:45 -05:00
Steve Pulec
d3df810065
Generalize decorator code.
2017-02-12 00:22:29 -05:00
Steve Pulec
3ed9428cb0
Cleanup class decorator. Closes #363 .
2015-06-27 19:01:01 -04:00
James Porter
fae22fd872
allow starting without reseting
2015-04-02 22:47:11 -05:00
Konstantinos Koukopoulos
f46c2508c0
allow running mock_s3 and mock_s3bucket_path one after the other
2015-02-20 21:50:49 +02:00
Steve Pulec
828ed13bde
Allow for class-based decorator. Closes #157
2014-11-16 19:05:28 -05:00
David Baumgold
eedb4c4b73
Support Python 3 using six
2014-08-28 10:57:43 -04:00
David Baumgold
4201e6b430
from __future__ import unicode_literals
2014-08-27 11:33:55 -04:00
Hugo Lopes Tavares
82eef28937
Add multi-region support to EC2 Instances
2014-08-26 17:56:56 -04:00
Konstantinos Koukopoulos
76a6a86eac
add Model metaclass to collect model accessor methods from backend classes
2014-06-18 10:46:20 +03:00
Andres Riancho
c6515af8bf
Now we have a stand-alone server which can provide services for more than one backend at the same time
2013-12-29 21:50:05 -05:00
Andres Riancho
186b40de54
All tests pass! Fixes https://github.com/spulec/moto/issues/72
2013-12-26 13:52:03 -03:00
Andres Riancho
748fa52cca
Fix for https://github.com/spulec/moto/issues/72
...
Need to run the whole test suite to make sure no regressions were added
2013-12-26 13:12:50 -03:00
Brock Pytlik
5a475881d2
support bucket names in url paths in s3bucket_path
2013-11-08 15:36:38 -05:00
Steve Pulec
dc2802a238
Set __wrapped__ on MockAWS decorator to be the test function. cc #41 .
2013-09-10 08:27:28 -04:00
Steve Pulec
47bd4c49a3
attempting to move to upstream httpretty
2013-05-03 19:33:13 -04:00
Steve Pulec
fd828bdb2d
Revert "Switch to real version of httpretty. woot."
...
This reverts commit 84aeff5b06
.
2013-04-30 08:33:53 -04:00
Steve Pulec
84aeff5b06
Switch to real version of httpretty. woot.
2013-04-29 23:36:24 -04:00
Steve Pulec
fe2b3518ae
move back to bundled httpretty for now
2013-03-19 11:46:54 -04:00
Steve Pulec
cd518d060e
move to httpretty fork instead of bundling it.
2013-03-17 18:13:21 -04:00
Steve Pulec
9e9e057289
Mock out instance metadata. Make basic connection with iam roles work. Closes #3 .
2013-03-10 16:55:41 -04:00
Steve Pulec
a728b2581a
Adding server mode
2013-03-05 08:14:43 -05:00
Steve Pulec
db943bcdbb
add other ways to call decorator
2013-02-27 22:25:15 -05:00
Steve Pulec
dc9677e323
clean up core responses
2013-02-25 23:48:17 -05:00
Steve Pulec
38611c3c99
fixing core model reset
2013-02-19 23:01:19 -05:00
Steve Pulec
4283cca63c
clean up urls. start to clean up responses
2013-02-18 21:22:03 -05:00
Steve Pulec
77d6df6531
basic ec2 and s3 working
2013-02-18 16:09:40 -05:00