<commit_before>Feature: Blog operations

	@auth
    Scenario: List empty blogs
        Given empty "blogs"
        When we get "/blogs"
        Then we get list with 0 items
        
    @auth
    Scenario: Create new blog
        Given empty "blogs"
        When we post to "blogs"
	    """
	    [{"name": "testBlog", "language": "en"}]
	    """
        And we get "/blogs"
        Then we get list with 1 items
	    """
	    {"_items": [{"name": "testBlog", "language": "en", "state": "open"}]}
	    """
	    
	@auth
    Scenario: Update blog
        Given "blogs"
        """
        [{"name": "testBlog"}]
        """
        When we patch given
        """
        {"description": "this is a test blog"}
        """
        And we patch latest
        """
        {"description":"the test of the test"}
        """
        Then we get updated response

   	@auth
    Scenario: Delete blog
        Given empty "blogs"
        When we post to "blogs"
        """<commit_msg>added behave test for retreiving open/closed blogs<commit_after>Feature: Blog operations

	@auth
    Scenario: List empty blogs
        Given empty "blogs"
        When we get "/blogs"
        Then we get list with 0 items
        
    @auth
    Scenario: Create new blog
        Given empty "blogs"
        When we post to "blogs"
	    """
	    [{"name": "testBlog", "language": "en"}]
	    """
        And we get "/blogs"
        Then we get list with 1 items
	    """
	    {"_items": [{"name": "testBlog", "language": "en", "state": "open"}]}
	    """
	    
	@auth
    Scenario: Update blog
        Given "blogs"
        """
        [{"name": "testBlog"}]
        """
        When we patch given
        """
        {"description": "this is a test blog"}
        """
        And we patch latest
        """
        {"description":"the test of the test"}
        """
        Then we get updated response
        
    @auth
    Scenario: Check states
        Given "blogs"
        """
        [{"name": "testBlog", "state": "closed"}, {"name": "testBlog2", "state": "closed"}, {"name": "testBlog3", "state": "open"}]
        """
        When we get "/blogs?where={"state": "closed"}"
        Then we get list with 2 items
	    """
	    {"_items": [{"name": "testBlog"}, {"name": "testBlog2"}]}
	    """
	    When we get "/blogs?where={"state": "open"}"
	    Then we get list with 1 items
	    """
	    {"_items": [{"name": "testBlog3"}]}
	    """

   	@auth
    Scenario: Delete blog
        Given empty "blogs"
        When we post to "blogs"
        """
{'fraction_non_alphanumeric': 0.15001973943939992, 'fraction_numerical': 0.0039478878799842085, 'mean_word_length': 1.7815587266739847, 'pattern_counts': {'":': 31, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6163303', 'n_tokens_mistral': 791, 'n_tokens_neox': 727, 'n_words': 258}